Class NetworkList\<T\>
Event based NetworkVariable container for syncing Lists
#
InheritanceSystem.Object
NetworkVariableBase
NetworkList\<T>
#
ImplementsSystem.IDisposable
#
Inherited MembersNetworkVariableBase.Initialize(NetworkBehaviour)
NetworkVariableBase.DefaultReadPerm
NetworkVariableBase.DefaultWritePerm
NetworkVariableBase.Name
NetworkVariableBase.ReadPerm
NetworkVariableBase.WritePerm
NetworkVariableBase.SetDirty(Boolean)
NetworkVariableBase.CanClientRead(UInt64)
NetworkVariableBase.CanClientWrite(UInt64)
System.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()
#
Namespace: Unity.Netcode#
Assembly: MLAPI.dll#
Syntax#
Type ParametersName | Description |
---|---|
T | The type for the list |
#
Constructors#
NetworkList()Constructor method for
#
Declaration#
NetworkList(IEnumerable\<T>, NetworkVariableReadPermission, NetworkVariableWritePermission)#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable\<T> | values | |
NetworkVariableReadPermission | readPerm | |
NetworkVariableWritePermission | writePerm |
#
Properties#
Count#
Declaration#
Property ValueType | Description |
---|---|
System.Int32 |
#
Item[Int32]#
Declaration#
ParametersType | Name | Description |
---|---|---|
System.Int32 | index |
#
Property ValueType | Description |
---|---|
T |
#
LastModifiedTickThis is actually unused left-over from a previous interface
#
Declaration#
Property ValueType | Description |
---|---|
System.Int32 |
#
Methods#
Add(T)#
Declaration#
ParametersType | Name | Description |
---|---|---|
T | item |
#
Clear()#
Declaration#
Contains(T)#
Declaration#
ParametersType | Name | Description |
---|---|---|
T | item |
#
ReturnsType | Description |
---|---|
System.Boolean |
#
Dispose()Overridden System.IDisposable implementation. CAUTION: If you derive from this class and override the Dispose() method, you must always invoke the base.Dispose() method!
#
Declaration#
OverridesNetworkVariableBase.Dispose()
#
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 |
#
OverridesNetworkVariableBase.IsDirty()
#
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 |
#
OverridesNetworkVariableBase.ReadDelta(FastBufferReader, Boolean)
#
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 |
#
OverridesNetworkVariableBase.ReadField(FastBufferReader)
#
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#
OverridesNetworkVariableBase.ResetDirty()
#
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 |
#
OverridesNetworkVariableBase.WriteDelta(FastBufferWriter)
#
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 |
#
OverridesNetworkVariableBase.WriteField(FastBufferWriter)
#
Events#
OnListChangedThe callback to be invoked when the list gets changed
#
Declaration#
Event TypeType | Description |
---|---|
NetworkList.OnListChangedDelegate\<> |
#
ImplementsSystem.IDisposable