.. | ||
BidirectionalDictionary.cs | ||
FizzySteamworks.cs | ||
FizzySteamworks.csproj | ||
IClient.cs | ||
IServer.cs | ||
LegacyClient.cs | ||
LegacyCommon.cs | ||
LegacyServer.cs | ||
LICENSE | ||
NextClient.cs | ||
NextCommon.cs | ||
NextServer.cs | ||
README.md |
FizzySteamworks
This is a community maintained repo forked from RayStorm.
Mirror docs and the official community Discord.
FizzySteamworks brings together Steam and Mirror . It supports both the old SteamNetworking and the new SteamSockets.
Dependencies
You must have Mirror installed and working before you can use this transport. Mirror FizzySteamworks is also obviously dependant on Mirror which is a streamline, bug fixed, maintained version of UNET for Unity.
You must have Steamworks.NET installed and working before you can use this transport. Steamworks.NET FizzySteamworks relies on Steamworks.NET to communicate with the Steamworks API. Requires .Net 4.x
Installation
Unity Package Manager
Unity Package Manager support is still fairly new but you can use it like so:
- 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/Chykary/FizzySteamworks.git?path=/com.mirror.steamworks.net
- Click the "Add" button and wait several seconds for the system to download and install the Steamworks.NET package from GitHub.
Manual
Fewer steps but more error prone and subject to being out of date with the latest changes:
- Download the latest unitypackage from the release section.
- Import the package into Unity.
Setting Up
- Install Steamworks.NET instructions can be found here.
- Install Mirror (Requires Mirror 35.0+) from the Unity asset store Download Mirror.
- Install FizzySteamworks from package manager as discribed in the above Install step.
- In your "NetworkManager" object replace "KCP" with "FizzySteamworks".
Host
To be able to have your game working you need to make sure you have Steam running in the background and that the Steam API initalized correctly. You can then call StartHost and use Mirror as you normally would.
Client
To connect a client to a host or server you need the CSteamID of the target you wish to connect to this is used in place of IP/Port. If your creating a Peer to Peer architecture then you would use the CSteamID of the host, this is Steam user ID as a ulong value. If you are creating a Client Server architecture then you will be using the CSteamID issued to the Steam Game Server when it logs the Steam API on. This is an advanced use case supported by Heathen's Steamworks but requires additional custom code if your using Steamworks.NET directly.
- Send the game to your buddy.
- Your buddy needs the host or game server steamID64 to be able to connect.
- Place the steamID64 into "localhost" then click "Client"
- Then they will be connected to your server be that your machine as a P2P connection or yoru Steam Game Server as a Client Server connection.
Testing your game locally
You cant connect to yourself locally while using FizzySteamworks since it's using Steams Networking which runs over Steam Client and addresses its connection based on the unique CSteamID of each actor. If you want to test your game locally you'll have to use "Telepathy Transport" instead of "FizzySteamworks".