Skip to content
ConcordConcordConcord

Entity:serialize

Serializes the Entity's Components.

← Entity

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 )
Name Type Description
ignoreKey boolean If true, the key Component is omitted (World:serialize uses the related flag ignoreKeys)
Name Type Description
data table Serialized Entity data