Skip to content
ConcordConcordConcord

Entity:getComponents

Returns a shallow copy of the Entity's fields, excluding __world and __isEntity.

← Entity

Returns a shallow copy of the Entity’s fields, excluding __world and __isEntity.

This is primarily the Entity’s Components. Extra non-component fields are also copied. Mutating a copied Component still mutates the Entity’s Component.

components = entity:getComponents( output )
Name Type Description
output table Table to copy into. A new table is created if omitted.
Name Type Description
components table