Unity.Netcode.NetworkVariableBase
Interface for network value containers
#
ImplementsSystem.IDisposable
#
Inherited MembersSystem.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
#
Syntax#
Constructors#
NetworkVariableBase(NetworkVariableReadPermission, NetworkVariableWritePermission)#
Declaration#
ParametersType | Name | Description |
---|---|---|
NetworkVariableReadPermission | readPerm | |
NetworkVariableWritePermission | writePerm |
#
Fields#
DefaultReadPerm#
Declaration#
Field ValueType | Description |
---|---|
NetworkVariableReadPermission |
#
DefaultWritePerm#
Declaration#
Field ValueType | Description |
---|---|
NetworkVariableWritePermission |
#
ReadPermThe read permission for this var
#
Declaration#
Field ValueType | Description |
---|---|
NetworkVariableReadPermission |
#
WritePerm#
Declaration#
Field ValueType | Description |
---|---|
NetworkVariableWritePermission |
#
Properties#
NameGets or sets the name of the network variable's instance (MemberInfo) where it was declared.
#
Declaration#
Property ValueType | Description |
---|---|
System.String |
#
Methods#
CanClientRead(UInt64)#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.UInt64 | clientId |
#
ReturnsType | Description |
---|---|
System.Boolean |
#
CanClientWrite(UInt64)#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.UInt64 | clientId |
#
ReturnsType | Description |
---|---|
System.Boolean |
#
Dispose()#
Declaration#
Initialize(NetworkBehaviour)#
Declaration#
ParametersType | Name | Description |
---|---|---|
NetworkBehaviour | networkBehaviour |
#
IsDirty()Gets Whether or not the container is dirty
#
Declaration#
ReturnsType | Description |
---|---|
System.Boolean | Whether or not the container is dirty |
#
ReadDelta(FastBufferReader, Boolean)Reads delta from the reader and applies them to the internal value
#
Declaration#
ParametersType | Name | Description |
---|---|---|
FastBufferReader | reader | The stream to read the delta from |
System.Boolean | keepDirtyDelta | Whether or not the delta should be kept as dirty or consumed |
#
ReadField(FastBufferReader)Reads the complete state from the reader and applies it
#
Declaration#
ParametersType | Name | Description |
---|---|---|
FastBufferReader | reader | The stream to read the state from |
#
ResetDirty()Resets the dirty state and marks the variable as synced / clean
#
Declaration#
SetDirty(Boolean)Sets whether or not the variable needs to be delta synced
#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.Boolean | isDirty |
#
WriteDelta(FastBufferWriter)Writes the dirty changes, that is, the changes since the variable was last dirty, to the writer
#
Declaration#
ParametersType | Name | Description |
---|---|---|
FastBufferWriter | writer | The stream to write the dirty changes to |
#
WriteField(FastBufferWriter)Writes the complete state of the variable to the writer
#
Declaration#
ParametersType | Name | Description |
---|---|---|
FastBufferWriter | writer | The stream to write the state to |
#
ImplementsSystem.IDisposable