Class NetworkVariable<T>
A variable that can be synchronized over the network.
Implements
Inherited Members
Namespace: Unity.Netcode
Assembly: solution.dll
Syntax
[Serializable]
[GenerateSerializationForGenericParameter(0)]
public class NetworkVariable<T> : NetworkVariableBase, IDisposable
Type Parameters
Name | Description |
---|---|
T | the unmanaged type for Network |
Constructors
Name | Description |
---|---|
Network |
Constructor for Network |
Fields
Name | Description |
---|---|
On |
The callback to be invoked when the value gets changed |
Properties
Name | Description |
---|---|
Value | The value of the NetworkVariable container |
Methods
Name | Description |
---|---|
Dispose() | Virtual IDisposable implementation |
~Network |
|
Is |
Gets Whether or not the container is dirty |
Read |
Reads value from the reader and applies it |
Read |
Reads the complete state from the reader and applies it |
Reset |
Resets the dirty state and marks the variable as synced / clean |
Write |
Writes the variable to the writer |
Write |
Writes the complete state of the variable to the writer |