Class NetworkBehaviourPrePostSpawnTests
Inheritance
NetworkBehaviourPrePostSpawnTests
Assembly: Unity.Netcode.RuntimeTests.dll
Syntax
public class NetworkBehaviourPrePostSpawnTests : NetcodeIntegrationTest
Properties
NumberOfClients
Declaration
protected override int NumberOfClients { get; }
Property Value
Overrides
Methods
CanStartServerAndClients()
Declaration
protected override bool CanStartServerAndClients()
Returns
Overrides
OnNetworkPreAndPostSpawn()
This validates that pre spawn can be used to instantiate and assign a NetworkVariable (or other prespawn tasks)
which can be useful for assigning a NetworkVariable value on the server side when the NetworkVariable has owner write permissions.
This also assures that duruing post spawn all associated NetworkBehaviours have run through the OnNetworkSpawn pass (i.e. OnNetworkSpawn order is not an issue)
Declaration
[UnityTest]
public IEnumerator OnNetworkPreAndPostSpawn()
Returns
OnNewClientCreated(NetworkManager)
Declaration
protected override void OnNewClientCreated(NetworkManager networkManager)
Parameters
Overrides
OnServerAndClientsCreated()
Declaration
protected override void OnServerAndClientsCreated()
Overrides
OnSetup()
Declaration
protected override IEnumerator OnSetup()
Returns
Overrides