MLAPI.NetworkVariable.INetworkVariable
Interface for network value containers
#
Namespace: System.Dynamic.ExpandoObject#
Assembly: MLAPI.dll#
Syntax#
Properties#
RemoteTickAccessor for the RemoteTick stored in the networkVariable, list, set or dictionary
#
Declaration#
Property ValueType | Description |
---|---|
System.UInt16 |
#
Methods#
CanClientRead(UInt64)Gets Whether or not a specific client can read to the varaible
#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.UInt64 | clientId | The clientId of the remote client |
#
ReturnsType | Description |
---|---|
System.Boolean | Whether or not the client can read to the variable |
#
CanClientWrite(UInt64)Gets Whether or not a specific client can write to the varaible
#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.UInt64 | clientId | The clientId of the remote client |
#
ReturnsType | Description |
---|---|
System.Boolean | Whether or not the client can write to the variable |
#
GetChannel()Returns the name of the channel to be used for syncing
#
Declaration#
ReturnsType | Description |
---|---|
NetworkChannel | The name of the channel to be used for syncing |
#
IsDirty()Gets Whether or not the container is dirty
#
Declaration#
ReturnsType | Description |
---|---|
System.Boolean | Whether or not the container is dirty |
#
ReadDelta(Stream, Boolean, UInt16, UInt16)Reads delta from the reader and applies them to the internal value
#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream to read the delta from |
System.Boolean | keepDirtyDelta | Whether or not the delta should be kept as dirty or consumed |
System.UInt16 | localTick | The local network tick at which this var was written, on the machine it was written |
System.UInt16 | remoteTick | The remote network tick at which this var was sent by the host |
#
ReadField(Stream, UInt16, UInt16)Reads the complete state from the reader and applies it
#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream to read the state from |
System.UInt16 | localTick | The local network tick at which this var was written, on the machine it was written |
System.UInt16 | remoteTick | The remote network tick at which this var was sent by the host |
#
ResetDirty()Resets the dirty state and marks the variable as synced / clean
#
Declaration#
SetNetworkBehaviour(NetworkBehaviour)Sets NetworkBehaviour the container belongs to.
#
Declaration#
ParametersType | Name | Description |
---|---|---|
NetworkBehaviour | behaviour | The behaviour the container behaves to |
#
WriteDelta(Stream)Writes the dirty changes, that is, the changes since the variable was last dirty, to the writer
#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream to write the dirty changes to |
#
WriteField(Stream)Writes the complete state of the variable to the writer
#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream to write the state to |