Class NetworkVariableBaseHelper
The BaseNetworkVariableHelper keeps track of: The number of instances and associates the instance with the NetworkVariable The number of times a specific NetworkVariable instance had its value changed (i.e. !Equal) Note: This could be expanded for future tests focuses around NetworkVariables
Namespace: Unity.Netcode.TestHelpers.Runtime
Syntax
public class NetworkVariableBaseHelper
Constructors
NetworkVariableBaseHelper(NetworkVariableBase)
Declaration
public NetworkVariableBaseHelper(NetworkVariableBase networkVariable)
Parameters
Type | Name | Description |
---|---|---|
NetworkVariableBase | networkVariable |
Properties
InstanceCount
Returns the total number of registered INetworkVariables
Declaration
public static int InstanceCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
VarChangedCount
Returns total number of changes that occurred for all registered INetworkVariables
Declaration
public static int VarChangedCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
ValueChanged()
Called by the child class NetworkVariableHelper when a value changed
Declaration
protected void ValueChanged()