STEAMWORKS.NET UNITY FRAMEWORK
GETTING ACCESS TO STEAM SERVICES WITHOUT TOUCHING C++ EVER AGAIN
You’ve done your Greenlight Campaign, managed to collect your votes and now your shining glory of a game has managed to gather enough of a following to get greenlit, fantastic, the wait is over you can now publish your game to Steam! Well done, well….. Almost
In order to publish and get your game listed, you will have to integrate with the Steamworks API with your game, how much you integrate is up to you but there are a few minimum services you need to plug in to. Doesn’t sound too hard does it? Except for one other point, the SDK is only available in native C++!
Back in the Unity 4.x days, this would mean you had to have a PRO license in A Druid’s Duel, made with Steamworks.net order to consume the C++ DLL’s (using DLL Imports), with Unity 5 things are a little easier but there is still this whole C++ barrier to get over, if you haven’t tried it before, just know it’s another level of complexity you’ll have to work with.
STEAMWORKS.NET TO THE RESCUE
Thankfully you are not on your own in the Unity world. When it comes to Unity, many developers have looked at the extra complexity of integrating Unity games with Steam, a few finally had enough and wrote an entire .NET wrapper around the whole Steamworks API, mainly targeted at Unity (but it’s available for other .NET frameworks as well).
Even better, this framework and the Unity assets are completely free, licensed under the very open and permissive MIT license, basically as open as a license as you can get these days.
WHAT SERVICES DOES THE FRAMEWORK EXPOSE?
The Steamworks.NET framework wrapper was designed to follow the native Valve C++ Steamworks API as close possible, it currently now boasts 100% coverage of the native Steamworks API across all interfaces!
Stats & Achievements
Utilizing Steamworks Stats and Achievements API provides an easy and effective method of storing persistent gameplay stats and roaming Achievements.
Steam provides a solid set of Leaderboard focused APIs so that your players can see who’s the fastest, the strongest, or just the downright deadliest!
User Authentication & Ownership
A variety of different API’s are provided to manage User Authentication and Ownership.
Steamworks provides an excellent set of tools for multiplayer Matchmaking perfect for both server based and lobby oriented games.
The Steam Community API is a set of APIs which allow you to utilize the Steam Overlay to its fullest and access information about other players including but definitely not limited Hyphen, made with Steamworks.net
to: Persona Name, Avatar, and Group Memberships.
A networking abstraction layer is provided to take the difficult logistics of sending data over the internet. Never worry about connectivity issues caused by things like port-forwarding ever again!
The Steam Cloud provides the simplest possible way to sync your save-game data to the cloud allowing your players to keep their in-game progress without hassle when switching between devices or even after a nasty computer crash!
VAC is there to provide you with an additional layer of security in your competitive multiplayer experiences. It is very similar to a virus scanner and has maintains a list of known cheats to detect.
And many more features!
You should get the gist by now, all services currently exposed by the C++ Steamworks API is made available in a more digestible and east to use C# wrapper.
SO THAT’S C# BUT WHAT ABOUT UNITY?
Obviously Unity supports C# (it’s actually the language of choice by Unity themselves now) but is there an easier way to get access to this framework from Unity?
Of course it is! If you check out the GitHub page releases for the framework (it’s open source you know!) you will see several precompiled packages, including a Unity custom asset. Once unpacked in to your game project, you will get access to the Steamworks manager code and several pre-built plugin’s, all in their respective folders ready to deploy, all nice and neat.
Alternatively you can just download the source and import that in to your project if you wish.
Now I could drone on for ages about how to get started with the framework, but I don’t have to, because it’s all documented very well on the https://steamworks.github.io/ site, complete with Getting Started guides, API reference (although you can also refer to the native C++ Steamworks reference as well) and of course a helpful FAQ page, with answers to pretty much any question you can Imagine Me, made with Steamworks.net think of (except how to get on Steam, go see Steam’s FAQ for that).
In short, it is as simple as:
1. Install the package.
2.Enter your Steam private keys and
app ID in the provided “steam_appid. txt” file. (Obviously, DON’T check this in to your source control! Keep it safe)
3.Restart Unity to use the updated configuration.
4.Start using the SteamManager.cs script in/from your code.
Still stuck, there are plenty of samples and examples to help you out:
If you are planning to publish to steam, are in the process of or have already been Greenlit, then this handy asset is going to be invaluable to you. It is by far the easiest way to integrate Steam in to your Unity project (without resorting to C++).
Publisher: Riley Labrecque and the Unity/ Steam community
Web Site: Steamworks
(but if you are happy, I’d recommend donating to this crew as they are awesome)