Skip to content

Struct StorageGrowth ​

Namespace: KenseiECS

One growth of a storage array past what a reserve stated for it (ReserveEntities(), Reserve(), Reserve(), a filter reserved by its types or the obsolete Reserve()): which array of which pool, filter or world grew, from what size to what size, and on which tick. FirstGrowthAfterReserve returns the first one; it is empty (IsEmpty) while nothing outgrew the reserve, and always without KENSEI_DEBUG.

csharp
public readonly struct StorageGrowth

Inherited Members ​

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Fields ​

NewSize ​

Size after the growth, counted like OldSize; for a filter sparse page, one past the last entity index the new page covers.

csharp
public readonly int NewSize

Field Value ​

int

OldSize ​

Size before the growth. For a filter's dense array it is the capacity in entities (the array keeps one more slot); for a filter sparse page, the first entity index the new page covers.

csharp
public readonly int OldSize

Field Value ​

int

Owner ​

What owns the array: the component type name for a pool, the filter's description (Filter Inc<A, B>) for a filter, or World. Null when empty.

csharp
public readonly string Owner

Field Value ​

string

Reserved ​

The reserved size of that dimension when it grew: the entities or components value passed to the obsolete Reserve(), the pool's ReservedComponents (pool dense), the filter's ReservedCount (filter dense) or ReservedEntities (entity slots, free-slot list, the sparse side of a reserved pool or filter).

csharp
public readonly int Reserved

Field Value ​

int

Storage ​

Which array grew: entity slots, free-slot list, pool sparse, pool dense, filter dense or filter sparse page. Null when empty.

csharp
public readonly string Storage

Field Value ​

string

Tick ​

Tick when the array grew.

csharp
public readonly int Tick

Field Value ​

int

Properties ​

IsEmpty ​

True while nothing has outgrown the reserve (and always without KENSEI_DEBUG).

csharp
public bool IsEmpty { get; }

Property Value ​

bool

Methods ​

ToString() ​

For example Position pool dense 512 -> 1024 (reserved 512) at tick 182, or none.

csharp
public override string ToString()

Returns ​

string