Class ObjectNameIdentifier
Inherited Members
Namespace: Unity.Netcode.TestHelpers.Runtime
Assembly: Unity.Netcode.TestHelpers.Runtime.dll
Syntax
public class ObjectNameIdentifier : NetworkBehaviour
Methods
DeRegisterNetworkObject()
Declaration
protected void DeRegisterNetworkObject()
OnDestroy()
Invoked when the GameObject the NetworkBehaviour is attached to is destroyed. If you override this, you must always invoke the base class version of this OnDestroy() method.
Declaration
public override void OnDestroy()
Overrides
OnGainedOwnership()
In client-server contexts, this method is invoked on both the server and the local client of the owner when NetworkObject ownership is assigned.
In distributed authority contexts, this method is only invoked on the local client that has been assigned ownership of the associated NetworkObject.
Declaration
public override void OnGainedOwnership()
Overrides
OnLostOwnership()
In client-server contexts, this method is invoked on the local client when it loses ownership of the associated NetworkObject and on the server when any client loses ownership.
In distributed authority contexts, this method is only invoked on the local client that has lost ownership of the associated NetworkObject.
Declaration
public override void OnLostOwnership()
Overrides
OnNetworkDespawn()
Gets called when the NetworkObject gets despawned. This method runs both client and server side.
Declaration
public override void OnNetworkDespawn()
Overrides
OnNetworkSpawn()
Gets called when the NetworkObject gets spawned, message handlers are ready to be registered, and the network is set up.
Declaration
public override void OnNetworkSpawn()
Overrides
RegisterAndLabelNetworkObject()
Declaration
protected void RegisterAndLabelNetworkObject()