Class NetworkBehaviourGenericTests
This class is for testing general fixes or functionality of NetworkBehaviours
Inherited Members
Namespace: Unity.Netcode.RuntimeTests
Syntax
public class NetworkBehaviourGenericTests : NetcodeIntegrationTest
Properties
NumberOfClients
Declaration
protected override int NumberOfClients { get; }
Property Value
Type | Description |
---|---|
Int32 |
Overrides
Methods
CanStartServerAndClients()
Declaration
protected override bool CanStartServerAndClients()
Returns
Type | Description |
---|---|
Boolean |
Overrides
OnNetworkDespawnInvokedWhenClientDisconnects()
This validates that upon a client disconnecting, the server-side client's player clone will invoke NetworkBehaviour.OnNetworkDespawn when the component precedes the NetworkObject component.(PR-2323)
Declaration
public IEnumerator OnNetworkDespawnInvokedWhenClientDisconnects()
Returns
Type | Description |
---|---|
IEnumerator |
OnPlayerPrefabGameObjectCreated()
Declaration
protected override void OnPlayerPrefabGameObjectCreated()
Overrides
OnSetup()
Declaration
protected override IEnumerator OnSetup()
Returns
Type | Description |
---|---|
IEnumerator |
Overrides
ValidatedDisableddNetworkBehaviourWarning()
This validates the fix for when a child GameObject with a NetworkBehaviour is deleted while the parent GameObject with a NetworkObject is spawned and is not deleted until a later time would cause an exception due to the NetworkBehaviour not being removed from the NetworkObject.ChildNetworkBehaviours list.
Declaration
public IEnumerator ValidatedDisableddNetworkBehaviourWarning()
Returns
Type | Description |
---|---|
IEnumerator |
ValidateDeleteChildNetworkBehaviour()
This validates the fix for when a child GameObject with a NetworkBehaviour is deleted while the parent GameObject with a NetworkObject is spawned and is not deleted until a later time would cause an exception due to the NetworkBehaviour not being removed from the NetworkObject.ChildNetworkBehaviours list.
Declaration
public IEnumerator ValidateDeleteChildNetworkBehaviour()
Returns
Type | Description |
---|---|
IEnumerator |
ValidateNoSpam()
This test validates a fix to NetworkBehaviour.NetworkObject when the NetworkManager.LogLevel is set to Developer Note: This test does not require any clients, but should not impact this particular test if new tests are added to this class that do require clients
Declaration
public IEnumerator ValidateNoSpam()
Returns
Type | Description |
---|---|
IEnumerator |