Class NetworkRigidbody
NetworkRigidbody allows for the use of Rigidbody on network objects. By controlling the kinematic mode of the Rigidbody and disabling it on all peers but the authoritative one.
Inherited Members
NetworkBehaviour.__rpc_func_table
NetworkBehaviour.__rpc_name_table
NetworkBehaviour.__rpc_exec_stage
NetworkBehaviour.NetworkVariableFields
NetworkBehaviour.__getTypeName()
NetworkBehaviour.__createNativeList<T>()
NetworkBehaviour.__initializeVariables()
NetworkBehaviour.__initializeRpcs()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: Unity.Netcode.Components
Assembly: Unity.Netcode.Components.dll
Syntax
[RequireComponent(typeof(Rigidbody))]
[RequireComponent(typeof(NetworkTransform))]
[AddComponentMenu("Netcode/Network Rigidbody")]
public class NetworkRigidbody : NetworkBehaviour
Methods
OnGainedOwnership()
For owner authoritative (i.e. ClientNetworkTransform) we adjust our authority when we gain ownership
Declaration
public override void OnGainedOwnership()
Overrides
OnLostOwnership()
For owner authoritative(i.e. ClientNetworkTransform) we adjust our authority when we have lost ownership
Declaration
public override void OnLostOwnership()
Overrides
OnNetworkDespawn()
Declaration
public override void OnNetworkDespawn()
Overrides
OnNetworkSpawn()
Declaration
public override void OnNetworkSpawn()