The simple instructions to get you up and running with Steamworks.NET!
To use Steamworks.NET you must already be a Steamworks developer.
- Option A: .unitypackage
- Download the .unitypackage from the Releases page on GitHub.
- Import everything into your project.
- Option B: Unity Package Manager
- Open the Package Manager
- Click the “+” (plus) button located in the upper left of the window
- Select the “Add package from git URL…” option
- Enter the following URL: https://github.com/rlabrecque/Steamworks.NET.git?path=/com.rlabrecque.steamworks.net to get the latest version from the master branch on github. It’s recommended to specify a version number at the end such as: https://github.com/rlabrecque/Steamworks.NET.git?path=/com.rlabrecque.steamworks.net#20.0.0 to get a pinned specific version. The latest version number can be found on the Releases page on GitHub.
- Click the “Add” button and wait several seconds for the system to download and install the Steamworks.NET package from GitHub.
- Recommended but Optional: Manually download the SteamManager MonoBehavior which contains a starting point for using the Steamworks API in your project.
- Option C: Manual installation
- Download the latest version from the GitHub master branch (direct link).
- Copy the
com.rlabrecque.steamworks.net/folder into your project’s
Assets/folder via explorer or finder, do not try to drag and drop it into Unity’s Project window.
- Recommended but Optional: Manually download the SteamManager MonoBehaviour which contains a starting point for using the Steamworks API in your project.
- Once imported 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. Ensure you save this file as ASCII or UTF-8 without a BOM.
- Close Unity and relaunch the project so that it loads the freshly updated
- 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.
- Option 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.
- Option 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.
- 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)
Unity upgrade notice: If you’re upgrading from Steamworks.NET 15.0.1 or earlier to 20.0.0 or later, or switching between one of the 3 different installation types you MUST remove the previous install of Steamworks.NET before continuing as the project structure has changed to support the Unity Package Manager.
If you are upgrading with the Unity Package Manager, just re-import the package, and optionally bring in the latest changes from SteamManager into your project. If you’re using the #version tag, you may need to uninstall your current release before reimporting a newer version.
If you’re not using the Unity Package Manager, follow the Uninstallation steps below, then re-follow the installation steps above.
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, or removing Steamworks.NET from the Unity Package Manager. This can be quickly done simply by deleting the
com.rlabrecque.steamworks.net directory, 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 libsteam_api.so
sdkencryptedappticket.dll can be found in the Steamworks SDK.