Skip to content

SceneComponentCodec

Defined in: scene.ts:175

Hook for a component whose full state does not fit the plain field record — e.g. TilemapLayer’s tile chunks live in a C++ blob. Registered by the owning plugin (see tilemapPlugin) so the generic (de)serializer carries no component-specific knowledge.

optional outOfBandFields?: readonly string[]

Defined in: scene.ts:183

Out-of-band field keys. Stripped from data before validation/insert (so the component insert doesn’t choke on them) and passed to importData after insert.

optional exportData(entity, data): void

Defined in: scene.ts:177

Serialize: write out-of-band state into the plain record.

number

Record<string, unknown>

void


optional importData(entity, outOfBand): void

Defined in: scene.ts:185

Deserialize: reapply out-of-band state after the component is inserted.

number

Record<string, unknown>

void