Table of Contents

Class SyncArray<T>

Namespace
LiteEntitySystem.Extensions
Assembly
LiteEntitySystem.dll
public class SyncArray<T> : SyncableField, IEnumerable<T>, IEnumerable where T : unmanaged

Type Parameters

T
Inheritance
object
SyncArray<T>
Implements
Inherited Members

Constructors

SyncArray(int)

public SyncArray(int size)

Parameters

size int

Properties

this[int]

public T this[int index] { get; set; }

Parameters

index int

Property Value

T

Length

public int Length { get; }

Property Value

int

Value

Changes to this array will NOT sync, so it should be used as readonly!

public T[] Value { get; }

Property Value

T[]

Methods

Clear()

public void Clear()

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<T> GetEnumerator()

Returns

IEnumerator<T>

An enumerator that can be used to iterate through the collection.

HasValue(T, out int)

public bool HasValue(T value, out int index)

Parameters

value T
index int

Returns

bool

OnSyncRequested()

Method for executing RPCs containing initial sync data that need to be sent after entity creation to existing players or when new player connected

protected override void OnSyncRequested()

RegisterRPC(ref SyncableRPCRegistrator)

protected override void RegisterRPC(ref SyncableRPCRegistrator r)

Parameters

r SyncableRPCRegistrator

Resize(int)

public void Resize(int newSize)

Parameters

newSize int