MLAPI.NetworkVariable.Collections.NetworkList-1
Event based NetworkVariable container for syncing Lists
#
ImplementsSystem.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
INetworkVariable
#
Inherited MembersObject.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
#
Namespace: System.Dynamic.ExpandoObject#
Assembly: MLAPI.dll#
Syntax#
Type ParametersName | Description |
---|---|
T | The type for the list |
#
Constructors#
NetworkList()Creates a NetworkList with the default value and settings
#
Declaration#
NetworkList(NetworkVariableSettings)Creates a NetworkList with the default value and custom settings
#
Declaration#
ParametersType | Name | Description |
---|---|---|
NetworkVariableSettings | settings | The settings to use for the NetworkList |
#
NetworkList(NetworkVariableSettings, IList<T>)Creates a NetworkList with a custom value and custom settings
#
Declaration#
ParametersType | Name | Description |
---|---|---|
NetworkVariableSettings | settings | The settings to use for the NetworkList |
System.Collections.Generic.IList<T> | value | The initial value to use for the NetworkList |
#
NetworkList(IList<T>)Creates a NetworkList with a custom value and the default settings
#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.Collections.Generic.IList<T> | value | The initial value to use for the NetworkList |
#
Fields#
SettingsThe settings for this container
#
Declaration#
Field ValueType | Description |
---|---|
NetworkVariableSettings |
#
Properties#
Count#
Declaration#
Property ValueType | Description |
---|---|
System.Int32 |
#
IsReadOnly#
Declaration#
Property ValueType | Description |
---|---|
System.Boolean |
#
Item[Int32]#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.Int32 | index |
#
Property ValueType | Description |
---|---|
T |
#
LastSyncedTimeGets the last time the variable was synced
#
Declaration#
Property ValueType | Description |
---|---|
System.Single |
#
RemoteTick#
Declaration#
Property ValueType | Description |
---|---|
System.UInt16 |
#
Methods#
Add(T)#
Declaration#
ParametersType | Name | Description |
---|---|---|
T | item |
#
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 |
#
Clear()#
Declaration#
Contains(T)#
Declaration#
ParametersType | Name | Description |
---|---|---|
T | item |
#
ReturnsType | Description |
---|---|
System.Boolean |
#
CopyTo(T[], Int32)#
Declaration#
ParametersType | Name | Description |
---|---|---|
T[] | array | |
System.Int32 | arrayIndex |
#
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 |
#
GetEnumerator()#
Declaration#
ReturnsType | Description |
---|---|
System.Collections.Generic.IEnumerator<T> |
#
IndexOf(T)#
Declaration#
ParametersType | Name | Description |
---|---|---|
T | item |
#
ReturnsType | Description |
---|---|
System.Int32 |
#
Insert(Int32, T)#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.Int32 | index | |
T | item |
#
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 |
#
Remove(T)#
Declaration#
ParametersType | Name | Description |
---|---|---|
T | item |
#
ReturnsType | Description |
---|---|
System.Boolean |
#
RemoveAt(Int32)#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.Int32 | index |
#
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 |
#
Events#
OnListChangedThe callback to be invoked when the list gets changed
#
Declaration#
Event TypeType | Description |
---|---|
NetworkList.OnListChangedDelegate<> |
#
Explicit Interface Implementations#
IEnumerable.GetEnumerator()#
Declaration#
ReturnsType | Description |
---|---|
System.Collections.IEnumerator |
#
ImplementsSystem.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
INetworkVariable