The simple instructions to get you up and running with Steamworks.NET!
To use Steamworks.NET you must already be a Steamworks developer.
- Download the .unitypackage from the Releases or clone/download the latest version from Github - (zip download).
- Import everything into your
Assets/folder. (If you’re using a non release/github/zip version then the
Standalone/folder does not need to be imported.)
- Launch your Unity project. The included editor scripts will copy steam_appid.txt into the root of your project.
- Open the
steam_appid.txtwhich now resides in the root of your Unity project and replace
480with your own AppId.
- Note: If you are using the github version you will want to grab the SteamManager MonoBehaviour. It is included in the unitypackage.
- Close Unity and relaunch the project so that it loads the freshly updated steam_appid.txt.
- Head over to Getting Started to start using Steamworks.NET!
Steamworks.NET is a free project but if it helps you make money please consider donating so that I can continue to support it in the years to come!
Also never ever required but greatly appreciated is a mention in your credits! It’s free, easy, and can help a lot! (Examples)
If you are not using Unity then you have two available paths that you can take.
- A: The recommended route is to build the standalone assemblies with the project file located in
Standalone/or download the prebuilt binaries which are available on the Releases page.
- Open the Visual Studio solution (.sln) file, build both targets one for Windows and one for OSX & Linux. (Optional if you downloaded a prebuilt version)
- Reference the built assembly (Steamworks.NET.dll) in your project.
- Start coding! Call SteamAPI.Init() before initializing your renderer.
- B: Otherwise, copy
Plugins/Steamworks.NETdirectly into your C# project. In Visual Studio open your project properties, change to the Build tab and define
Conditional compilation symbols.
- This is only recommended if your binary is not portable across platforms already. If you ship on multiple platforms you must have multiple build targets for each platforms. Please prefer the first route.
- When you build your application the following files must be copied into the output dir:
- All Platforms:
- steam_appid.txt - Required for testing your application outside of steam. Do not ship this to customers!
- Steamworks.NET.dll - Make sure it’s the correct version for the platform that you plan on shipping for! - When building for OSX or Linux the wrong Steamworks.NET.dll will be copied over by default, it is recommended that you create a post build script to copy the correct version.
- Steamworks.NET.dll.config - This lets Mono know where to find CSteamworks.
- All Platforms:
Head over to Getting Started to start using Steamworks.NET
Steamworks.NET is a free project but if it helps you make money please consider donating so that I can continue to support it in the years to come! Also never ever required but greatly appreciated is a mention in your credits. (Examples)
Upgrading Steamworks .NET is easy!
If you are using the unitypackage simply open the unitypackage within your Unity project and import everything, overwriting the existing files.
If you are upgrading to a source drop from github then clone or download the latest zip and copy the
Plugins/ folders into your
Assets/ folder using Windows Explorer or Finder ensuring that you overwriting everything. If you try to drop these folders into the Unity Project view then the files are often duplicated. Then grab the latest SteamManager script and overwrite your old one, merging any changes you may have made to it.
Steamworks.NET does not come with an easy one click uninstaller, but it stores no additional data and can be cleanly removed simply by removing the files that were initially imported. This can be quickly done simply by deleting the
Plugins/CSteamworks.bundle folders along with the
steam_api binaries in
Plugins/x86[_64], the SteamManager.cs script and then the
steam_appid.txt in the root of your project.
Using Steam Encrypted App Ticket?
The functions exposed via
sdkencryptedappticket.h are supported in Steamworks.NET but you will need to manually place the
sdkencryptedappticket.dll/so/dylib binaries in one of the following locations depending on the platform:
- Windows: Next to steam_api.dll
- OSX: In
- Linux: Next to CSteamworks.so
sdkencryptedappticket.dll can be found in the Steamworks SDK.