Class NetworkBehaviourWithNetworkVariables
A test NetworkBeahviour that provides a varying NetworkList size as well as additional NetworkVariables to assure if a NetworkObject fails to be created the synchronization process will continue (i.e. it will skip over that block of the reader buffer).
Inheritance
NetworkBehaviourWithNetworkVariables
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)
Namespace: Unity.Netcode.RuntimeTests
Assembly: solution.dll
Syntax
public class NetworkBehaviourWithNetworkVariables : NetworkBehaviour
Fields
ClientSpawnCount
Declaration
public static readonly Dictionary<ulong, int> ClientSpawnCount
Field Value
Type | Description |
---|---|
Dictionary<ulong, int> |
NetworkVariableData1
Declaration
public NetworkList<ulong> NetworkVariableData1
Field Value
Type | Description |
---|---|
NetworkList<ulong> |
NetworkVariableData2
Declaration
public NetworkVariable<int> NetworkVariableData2
Field Value
Type | Description |
---|---|
NetworkVariable<int> |
NetworkVariableData3
Declaration
public NetworkVariable<long> NetworkVariableData3
Field Value
Type | Description |
---|---|
NetworkVariable<long> |
NetworkVariableData4
Declaration
public NetworkVariable<byte> NetworkVariableData4
Field Value
Type | Description |
---|---|
NetworkVariable<byte> |
Properties
ServerSpawnCount
Declaration
public static int ServerSpawnCount { get; }
Property Value
Type | Description |
---|---|
int |
Methods
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
ResetSpawnCount()
Declaration
public static void ResetSpawnCount()