Skip to content

GetInstances

Array<Entity(Base)> GetInstances(Entity(Base)? entity = null, Bool isTransitive = true)

System · system operation · implicitly imported

Returns the instances of an entity, or every entity when no entity is given.

With isTransitive set to true, indirect instances (entities whose meta chain contains entity) are included; with false, only direct instances (whose meta is entity) are returned.

Parameters

  • Entity(Base)? entity = null — The meta entity to get the instances of, or null for every entity.
  • Bool isTransitive = true — Whether indirect instances are included.

Returns

Array<Entity(Base)> — The instances of entity, or every entity if entity is null.

Errors

A runtime type error if entity is not an Entity, or isTransitive is not a Bool.

See Also