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.
Inheritance
Inherited Members
Namespace: Unity.Netcode.Components
Assembly: Unity.Netcode.Runtime.dll
Syntax
[RequireComponent(typeof(NetworkTransform))]
[RequireComponent(typeof(Rigidbody2D))]
[AddComponentMenu("Netcode/Network Rigidbody 2D")]
public class NetworkRigidbody2D : NetworkRigidbodyBase
Properties
Rigidbody2D
Declaration
public Rigidbody2D Rigidbody2D { get; }
Property Value
Type | Description |
---|---|
Rigidbody2D |
Methods
Awake()
Declaration
protected virtual void Awake()