Class NetworkVariableBase
Interface for network value containers
Implements
Inherited Members
Namespace: Unity.Netcode
Assembly: solution.dll
Syntax
public abstract class NetworkVariableBase : IDisposable
Constructors
| Name | Description |
|---|---|
| NetworkVariableBase(NetworkVariableReadPermission, NetworkVariableWritePermission) | The default constructor for NetworkVariableBase that can be used to create a custom NetworkVariable. |
Fields
| Name | Description |
|---|---|
| DefaultReadPerm | The default read permissions |
| DefaultWritePerm | The default write permissions |
| ReadPerm | The read permission for this var |
| WritePerm | The write permission for this var |
Properties
| Name | Description |
|---|---|
| Name | Gets or sets the name of the network variable's instance (MemberInfo) where it was declared. |
Methods
| Name | Description |
|---|---|
| CanClientRead(ulong) | Gets if a specific client has permission to read the var or not |
| CanClientWrite(ulong) | Gets if a specific client has permission to write the var or not |
| Dispose() | Virtual IDisposable implementation |
| GetBehaviour() | |
| Initialize(NetworkBehaviour) | Initializes the NetworkVariable |
| IsDirty() | Gets Whether or not the container is dirty |
| MarkNetworkBehaviourDirty() | |
| ReadDelta(FastBufferReader, bool) | Reads delta from the reader and applies them to the internal value |
| ReadField(FastBufferReader) | Reads the complete state from the reader and applies it |
| ResetDirty() | Resets the dirty state and marks the variable as synced / clean |
| SetDirty(bool) | Sets whether or not the variable needs to be delta synced |
| WriteDelta(FastBufferWriter) | Writes the dirty changes, that is, the changes since the variable was last dirty, to the writer |
| WriteField(FastBufferWriter) | Writes the complete state of the variable to the writer |