Awesome
FacepunchSteam Socket
This package provides Steam socket for Mirage using Facepunch Steamworks.
Dependencies
- Mirage 99.0.2+
- Facepunch Steamworks (included)
- .NET 4.x
Installation
The preferred installation method is Unity Package Manager.
Unity 2019.3+
- Open your project in Unity
- Install Mirage by following the provided instructions (adding the registry etc.)
- Click on Windows -> Package Manager
- Select My Registry from the dropdown and install the
SteamyFaceNG
package.
Unity 2019.2 or older
- Open your project in Unity
- Install Mirage
- Click on Windows -> Package Manager
- Click on the plus sign on the left and click on "Add package from git URL..."
- Enter https://github.com/MirageNet/SteamyFaceNG.git?path=/Assets/Mirage/Runtime/Sockets/FacepunchSteam
Adding the socket
- Open your network object (which contains the
NetworkServer
,NetworkClient
etc.) and addSteamSocketFactory
component. - Setup your AppID and other settings as needed.
- Assign this component as a reference to the
Socket Factory
fields ofNetworkServer
andNetworkClient
.
Note: The default 480 (Spacewar) AppID is a very grey area, technically, it's not allowed but they don't really do anything about it. When you have your own AppID from Steam then replace the 480 with your own game AppID. If you know a better way around this, please make an Issue ticket.
Using the socket
Host
To be able to have your game working you need to make sure you have Steam running in the background.
Client
Clients need the SteamID64 of the host to be able to connect - it's used as the connection address.
Testing your game locally
You can't connect to yourself locally while using this socket since Steam doesn't allow multiple instances. If you want to test your game locally, you'll have to use UDP socket, for example, or use multiple machines.