Class NetworkList<T>
Event based NetworkVariable container for syncing Lists
Implements
Inherited Members
Namespace: Unity.Netcode
Assembly: solution.dll
Syntax
[GenerateSerializationForGenericParameter(0)]
public class NetworkList<T> : NetworkVariableBase, IDisposable where T : unmanaged, IEquatable<T>
Type Parameters
Name | Description |
---|---|
T | The type for the list |
Constructors
Name | Description |
---|---|
NetworkList() | Constructor method for NetworkList |
NetworkList(IEnumerable<T>, NetworkVariableReadPermission, NetworkVariableWritePermission) |
Properties
Name | Description |
---|---|
Count | |
this[int] | |
LastModifiedTick | This is actually unused left-over from a previous interface |
Methods
Name | Description |
---|---|
Add(T) | |
Clear() | |
Contains(T) | |
Dispose() | Overridden IDisposable implementation. CAUTION: If you derive from this class and override the Dispose() method, you must always invoke the base.Dispose() method! |
GetEnumerator() | |
IndexOf(T) | |
Insert(int, T) | |
IsDirty() | Gets Whether or not the container is dirty |
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 |
Remove(T) | |
RemoveAt(int) | |
ResetDirty() | Resets the dirty state and marks the variable as synced / clean |
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 |
Events
Name | Description |
---|---|
OnListChanged | The callback to be invoked when the list gets changed |