Class NetVarContainer
This is a refactor of the original test's NetworkBehaviour INetVarInfo derived NetworkBehaviours
Inherited Members
NetworkBehaviour.__rpc_func_table
NetworkBehaviour.__rpc_name_table
NetworkBehaviour.__rpc_exec_stage
NetworkBehaviour.NetworkVariableFields
NetworkBehaviour.__getTypeName()
NetworkBehaviour.__createNativeList<T>()
NetworkBehaviour.__initializeVariables()
NetworkBehaviour.__initializeRpcs()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, InstantiateParameters)
Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
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: Unity.Netcode.RuntimeTests.dll
Syntax
public class NetVarContainer : NetworkBehaviour
Fields
NumberOfNetVarsToCheck
Declaration
public NetVarContainer.NetVarsToCheck NumberOfNetVarsToCheck
Field Value
| Type | Description |
|---|---|
| NetVarContainer.NetVarsToCheck |
ValueToSetNetVarTo
Declaration
public int ValueToSetNetVarTo
Field Value
| Type | Description |
|---|---|
| int |
Methods
AreNetVarsDirty()
Only used on the server side to check the isDirty flag for the NetworkVariables being used for each test iteration
Declaration
public bool AreNetVarsDirty()
Returns
| Type | Description |
|---|---|
| bool |
CreatePrefabGameObject(NetVarCombinationTypes)
Creates a prefab with two instances of this NetworkBehaviour
Declaration
public static GameObject CreatePrefabGameObject(NetVarCombinationTypes netVarsToCheck)
Parameters
| Type | Name | Description |
|---|---|---|
| NetVarCombinationTypes | netVarsToCheck |
Returns
| Type | Description |
|---|---|
| GameObject | The created prefab |
HaveAllValuesChanged(int)
Only used on the client-side for this test, this is used to see if the network variables have changed.
Declaration
public bool HaveAllValuesChanged(int valueToCheck)
Parameters
| Type | Name | Description |
|---|---|---|
| int | valueToCheck |
Returns
| Type | Description |
|---|---|
| bool |
OnNetworkSpawn()
Declaration
public override void OnNetworkSpawn()
Overrides
SetNetworkVariableValues()
Server side only, sets the NetworkVariables being used to the ValueToSetNetVarTo that is pre-configured when the Network Prefab is created.
Declaration
public void SetNetworkVariableValues()