Class NetworkVariableHelper<T>
Will automatically register for the NetworkVariable OnValueChanged delegate handler. It then will expose that single delegate invocation to anything that registers for this NetworkVariableHelper's instance's OnValueChanged event. This allows us to register any NetworkVariable type as well as there are basically two "types of types":
- IEquatable<T>
- ValueType
Inherited Members
Namespace: Unity.Netcode.TestHelpers.Runtime
Assembly: Unity.Netcode.Runtime.Tests.dll
Syntax
public class NetworkVariableHelper<T> : NetworkVariableBaseHelper
Type Parameters
Name | Description |
---|---|
T | The type of value managed by the NetworkVariable |
Constructors
NetworkVariableHelper(NetworkVariableBase)
Constructor taking a NetworkVariableBase as a parameter.
Declaration
public NetworkVariableHelper(NetworkVariableBase networkVariable)
Parameters
Type | Name | Description |
---|---|---|
NetworkVariableBase | networkVariable | The NetworkVariableBase parameter. |
Events
OnValueChanged
Event invoked when a NetworkVariable<T>'s value is changed. See also: NetworkVariableHelper<T>.OnMyValueChangedDelegateHandler.
Declaration
public event NetworkVariableHelper<T>.OnMyValueChangedDelegateHandler OnValueChanged
Event Type
Type | Description |
---|---|
NetworkVariableHelper<T>.OnMyValueChangedDelegateHandler |