Class NetworkBehaviourPrePostSpawnTests.NetworkBehaviourPreSpawn
Inheritance
NetworkBehaviourPrePostSpawnTests.NetworkBehaviourPreSpawn
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Assembly: Unity.Netcode.RuntimeTests.dll
Syntax
public class NetworkBehaviourPrePostSpawnTests.NetworkBehaviourPreSpawn : NetworkBehaviour
Fields
NetworkVarValueMatches
Declaration
public bool NetworkVarValueMatches
Field Value
OnNetworkPreSpawnCalled
Declaration
public bool OnNetworkPreSpawnCalled
Field Value
TestNetworkVariable
Declaration
public NetworkVariable<int> TestNetworkVariable
Field Value
ValueToSet
Declaration
public static int ValueToSet
Field Value
Methods
OnNetworkPreSpawn(ref NetworkManager)
Gets called after the NetworkObject is spawned. No NetworkBehaviours associated with the NetworkObject will have had OnNetworkSpawn() invoked yet.
A reference to NetworkManager is passed in as a parameter to determine the context of execution (IsServer/IsClient)
Declaration
protected override void OnNetworkPreSpawn(ref NetworkManager networkManager)
Parameters
Overrides
OnNetworkSpawn()
Gets called when the NetworkObject gets spawned, message handlers are ready to be registered and the network is setup.
Declaration
public override void OnNetworkSpawn()
Overrides