Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrrobinofficial/guide-unitysteamnetcodegameobjects
This repository is designed to help developers learn how to get started with Facepunch/Steamworks Networking and Unity Netcode For GameObjects.
https://github.com/mrrobinofficial/guide-unitysteamnetcodegameobjects
facepunch gameobjects mlapi netcode network networking steam unity unity3d
Last synced: 7 days ago
JSON representation
This repository is designed to help developers learn how to get started with Facepunch/Steamworks Networking and Unity Netcode For GameObjects.
- Host: GitHub
- URL: https://github.com/mrrobinofficial/guide-unitysteamnetcodegameobjects
- Owner: MrRobinOfficial
- License: mit
- Created: 2022-01-16T21:14:41.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-22T14:38:12.000Z (7 months ago)
- Last Synced: 2024-04-22T16:11:16.671Z (7 months ago)
- Topics: facepunch, gameobjects, mlapi, netcode, network, networking, steam, unity, unity3d
- Language: C#
- Homepage:
- Size: 184 KB
- Stars: 47
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
![Banner](Static/Img/Banner.png)
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/mrrobinofficial/guide-unitysteamnetcodegameobjects/blob/HEAD/LICENSE.txt)
![guide-status](https://img.shields.io/badge/guide_status-completed-green)#
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 BackendsNetcode supports the following platforms:
* Windows, macOS, and Linux
* iOS and Android
* XR platforms running on Windows, Android, and iOS operating systemsYou can read more about **Unity Multiplayer Networking** docs [here](https://docs-multiplayer.unity3d.com/).
## ⚒️ How to Install
If you haven't install Unity Netcode For GameObjects, then do so via this [link](https://docs-multiplayer.unity3d.com/netcode/current/installation/install).
Then install [Facepunch Transport](https://github.com/Unity-Technologies/multiplayer-community-contributions/tree/main/Transports/com.community.netcode.transport.facepunch) layer.
Or copy this git command and paste in Package Manager:
```console
https://github.com/Unity-Technologies/multiplayer-community-contributions.git?path=/Transports/com.community.netcode.transport.facepunch
```Then you have [wiki page](https://wiki.facepunch.com/steamworks/) for API and more documentation code.
## 📝 How To Use It
You need to assign SteamId to FacepunchTransport
```csharp
private void HandleTransport(SteamId id)
{
// Lorem Ipsum
NetworkManager.Singleton.GetComponent().targetSteamId = id;
}
```By using callback from steam, you can send that information to FacepunchTransport
```csharp
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](https://www.youtube.com/playlist?list=PLS6sInD7ThM2_N9a1kN2oM4zZ-U-NtT2E) over Unity Netcode For GameObjects.
## 🔗 Helpful Links
* [Multiplayer Community Contributions](https://github.com/Unity-Technologies/multiplayer-community-contributions/)
* [Facepunch Transport for Netcode for GameObjects](https://github.com/Unity-Technologies/multiplayer-community-contributions/tree/main/Transports/com.community.netcode.transport.facepunch)
* [Facepunch Wiki Page](https://wiki.facepunch.com/steamworks/)
* [Steamworks API](https://partner.steamgames.com/doc/api)
* [DapperDino's playlist over Unity Netcode For GameObjects](https://www.youtube.com/playlist?list=PLS6sInD7ThM2_N9a1kN2oM4zZ-U-NtT2E)## 🆘 Support
If you have any questions or issue, just write either to my [YouTube channel](https://www.youtube.com/@mrrobinofficial), [Email](mailto:[email protected]) or [Twitter DM](https://twitter.com/MrRobinOfficial).