Docs

Netcode

Multiplayer for GameObjects.

What is Netcode

Netcode for GameObjects adds client-server multiplayer with synced variables and remote procedure calls.

Install

package id
text
com.unity.netcode.gameobjects

Usage

csharp
csharp
public class Player : NetworkBehaviour {
    NetworkVariable<int> Score = new();
    [Rpc(SendTo.Server)] void ScoreRpc() => Score.Value++;
}

Docs

Official documentation: Netcode.