Skip to content

This repository is designed to help developers learn how to get started with Facepunch/Steamworks Networking and Unity Netcode For GameObjects.

License

Notifications You must be signed in to change notification settings

MrRobinOfficial/Guide-UnitySteamNetcodeGameObjects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Banner

license guide-status

This repo is a comprehensive repository designed to help users quickly and effectively get started with Unity's multiplayer solutions using Facepunch as the transport layer and Unity's Netcode For GameObjects framework.

⚙️ Before you begin

Netcode supports the following versions:

  • Unity 2021.3 and later
  • Mono and IL2CPP Scripting Backends

Netcode supports the following platforms:

  • Windows, macOS, and Linux
  • iOS and Android
  • XR platforms running on Windows, Android, and iOS operating systems

You can read more about Unity Multiplayer Networking docs here.

⚒️ How to Install

If you haven't install Unity Netcode For GameObjects, then do so via this link.

Then install Facepunch Transport layer.

Or copy this git command and paste in Package Manager:

https://github.com/Unity-Technologies/multiplayer-community-contributions.git?path=/Transports/com.community.netcode.transport.facepunch

Then you have wiki page for API and more documentation code.

📝 How To Use It

You need to assign SteamId to FacepunchTransport

private void HandleTransport(SteamId id)
{
    // Lorem Ipsum
    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.

🔗 Helpful Links

🆘 Support

If you have any questions or issue, just write either to my YouTube channel, Email or Twitter DM.

About

This repository is designed to help developers learn how to get started with Facepunch/Steamworks Networking and Unity Netcode For GameObjects.

Topics

Resources

License

Stars

Watchers

Forks

Languages