/UnitySteamNetcodeGameObjects

Unity Netcode For GameObjects with Facepunch/Steamworks Networking

Primary LanguageC#MIT LicenseMIT

UnitySteamNetcodeGameObjects

Code for using "Steamworks Network/Facepunch" solution with "Unity Netcode For GameObjects/MLAPI"

How To Install

Install first Unity Netcode For GameObjects
Then install Facepunch Transport Or Copy this git command and paste in Package Manager
Then you have wiki page for getting started

How To Use It:

You need to assign SteamId to FacepunchTransport

private void HandleTransport(SteamId id) => NetworkManager.Singleton.GetComponent<FacepunchTransport>().targetSteamId = id;

By using callback from steam, you can send that information to FacepunchTransport

private void Start() => SteamFriends.OnGameLobbyJoinRequested += OnGameLobbyJoinRequested; // Add the callback

private void OnDestroy() => SteamFriends.OnGameLobbyJoinRequested -= OnGameLobbyJoinRequested; // Remove the callback

private void OnGameLobbyJoinRequested(Lobby lobby, SteamId id) => HandleTransport(id);

After you got the callbacks and also changing "targetSteamId" in FacepunchTransport, is pretty much the same stuff with Unity Netcode For GameObjects.
Highly recommend watching DapperDino's playlist over Unity Netcode For GameObjects

All the links

Link to Multiplayer Community Contributions
Link to Facepunch Transport for Netcode for GameObjects
Link to Facepunch Wiki Page
Link to Steamworks API
Link to DapperDino's playlist over Unity Netcode For GameObjects