Class NetworkRigidbody2D
NetworkRigidbody allows for the use of Rigidbody2D on network objects. By controlling the kinematic mode of the rigidbody and disabling it on all peers but the authoritative one.
Inherited Members
Namespace: Unity.Netcode.Components
Assembly: Unity.Netcode.Components.dll
Syntax
[RequireComponent(typeof(Rigidbody2D))]
[RequireComponent(typeof(NetworkTransform))]
[AddComponentMenu("Netcode/Network Rigidbody 2D")]
public class NetworkRigidbody2D : NetworkBehaviour
Methods
OnNetworkDespawn()
Gets called when the Network
Declaration
public override void OnNetworkDespawn()
Overrides
OnNetworkSpawn()
Gets called when the Network
Declaration
public override void OnNetworkSpawn()