Skip to main content

SchemaArrayAccessor<T>

Schema accessor for array-typed fields. Reads/writes at offset + index * sizeof(T).

public sealed class SchemaArrayAccessor<T> where T : unmanaged

Namespace: DeadworksManaged.Api
Source: Entities/SchemaArrayAccessor.cs#L4

Constructors​

new SchemaArrayAccessor()​

Signature

public SchemaArrayAccessor(ReadOnlySpan<byte> className, ReadOnlySpan<byte> fieldName, int networkStateChangedOffset = 0)

Source: Entities/SchemaArrayAccessor.cs#L12

Methods​

SchemaArrayAccessor.Get()​

Reads element index from the array field on entity.

Signature

public T Get(nint entity, int index)

Source: Entities/SchemaArrayAccessor.cs#L31

SchemaArrayAccessor.Set()​

Writes element index in the array field on entity, notifying network state if needed.

Signature

public void Set(nint entity, int index, T value)

Source: Entities/SchemaArrayAccessor.cs#L37