Table of Contents

Class ArchetypeDefinitionRecord

Namespace
Typhon.Profiler
Assembly
Typhon.Profiler.dll

Rich archetype definition stored in the v7+ ArchetypeDefinitions table of a .typhon-trace file. Carries the parent/child graph, slot-ordered component IDs, storage-mode bitmasks, cascade-delete edges, and (when cluster-eligible) the inline cluster layout. Drives the Workbench ArchetypeBrowser and relationship view for trace sessions.

public sealed class ArchetypeDefinitionRecord
Inheritance
ArchetypeDefinitionRecord
Inherited Members

Remarks

The thin ArchetypeRecord (id → name) stays in v7+ alongside this richer table — they reference the same archetype id, so consumers can join. Naming chosen over re-defining the existing record so wire-format readers that just need id→name resolution aren't forced through the heavier deserialisation path.

Constructors

ArchetypeDefinitionRecord()

public ArchetypeDefinitionRecord()

Properties

ArchetypeId

Archetype id (matches ArchetypeId).

public ushort ArchetypeId { get; init; }

Property Value

ushort

CascadeTargets

Cascade-delete edges: child archetype ids whose entities are auto-destroyed when an entity of this archetype is destroyed.

public ushort[] CascadeTargets { get; init; }

Property Value

ushort[]

ChildArchetypeIds

Direct children (immediate subtype archetypes).

public ushort[] ChildArchetypeIds { get; init; }

Property Value

ushort[]

ClusterInfo

Per-archetype cluster layout. Non-null only when Flags & 0x01 (cluster-eligible).

public ArchetypeClusterInfoRecord ClusterInfo { get; init; }

Property Value

ArchetypeClusterInfoRecord

ComponentCount

Total component count (own + inherited). Max 16.

public byte ComponentCount { get; init; }

Property Value

byte

ComponentTypeIds

Slot-ordered component type ids — index N ⇒ component type at slot N. Length == ComponentCount.

public int[] ComponentTypeIds { get; init; }

Property Value

int[]

Flags

Bit flags. 0x01 IsClusterEligible, 0x02 HasClusterIndexes, 0x04 HasClusterSpatial.

public byte Flags { get; init; }

Property Value

byte

Name

Display name (CLR type name).

public string Name { get; init; }

Property Value

string

ParentArchetypeId

Parent archetype id, or 0xFFFF for root archetypes.

public ushort ParentArchetypeId { get; init; }

Property Value

ushort

Revision

Schema revision from [Archetype(Revision)].

public int Revision { get; init; }

Property Value

int

TransientSlotMask

Bit N set ⇒ slot N uses Transient storage. Slots set in neither mask use SingleVersion.

public ushort TransientSlotMask { get; init; }

Property Value

ushort

VersionedSlotMask

Bit N set ⇒ slot N uses Versioned storage.

public ushort VersionedSlotMask { get; init; }

Property Value

ushort