ScriptComponentStorage struct
Per-script-component flat storage — one instance per registered schema. Indexed by EntityCacheHandle (the entity's SoA slab slot). AoS layout: BlobSize bytes per entity, contiguous, sized at Initialize time.
Public functions
- void Initialize(uint32_t capacity)
- void GrowBlobs(uint16_t oldBlobSize, uint16_t newBlobSize)
Public variables
- ScriptSchema Schema
- uint32_t Capacity
- std::unique_ptr<uint8_t[]> Blobs
- Schema.BlobSize * Capacity bytes.
- std::unique_ptr<uint8_t[]> HasComp
- 1 byte per entity: 1 = attached, 0 = not.
Function documentation
void ScriptComponentStorage:: GrowBlobs(uint16_t oldBlobSize,
uint16_t newBlobSize)
Re-allocate Blobs with newBlobSize, copying existing data per-entity. Called by ScriptRegistry::