Table of Contents

Struct Comp<T>

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Typed component handle — identifies a component type within the ECS system. Stored as static readonly fields on archetype classes to declare schema.

public readonly struct Comp<T> where T : unmanaged

Type Parameters

T

The unmanaged component data type.

Inherited Members

Remarks

ComponentTypeId: global type registry ID (shared when the same component type appears in multiple archetypes).

Slot resolution happens at runtime via GetSlot(int) — avoids static initialization ordering issues with inheritance.

Methods

Default()

Create a zero-initialized ComponentValue for use during entity spawning.

public ComponentValue Default()

Returns

ComponentValue

Set(in T)

Create a ComponentValue with the given data for use during entity spawning.

public ComponentValue Set(in T value)

Parameters

value T

Returns

ComponentValue