Entity:serialize
Serializes the Entity's Components.
Serializes the Entity’s Components.
Output shape: optional key field (key value) unless ignoreKey; other components as array entries
each with __name plus fields from Component:serialize. Components that return nil from serialize are omitted.
data = entity:serialize( ignoreKey )Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
ignoreKey |
boolean | If true, the key Component is omitted (World:serialize uses the related flag ignoreKeys) |
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
data |
table | Serialized Entity data |