Quantum 3 3.1.0

Public Member Functions | Static Public Member Functions | List of all members
EntityGroup Struct Reference

A built-in component representing the owner of an entity group. All the sub entities get destroyed as their owner is destroyed. Use GetEntities or FrameBase.GetEntityGroupIterator to iterate. More...

Inherits IComponent.

Public Member Functions

ReadOnlySpan< EntityRef > GetEntities (FrameBase f)
 Returns owned entities. This span becomes invalid if the owner entity is destroyed. It also does not filter for owned entities that have already been destroyed. For more resilience, use FrameBase.GetEntityGroupIterator More...
 

Static Public Member Functions

static EntityGroup Create (FrameBase f, ReadOnlySpan< EntityRef > entities)
 Creates an entity group. More...
 
static void Serialize (void *ptr, FrameSerializer stream)
 Serialized the map entity link on the snapshot. More...
 

Detailed Description

A built-in component representing the owner of an entity group. All the sub entities get destroyed as their owner is destroyed. Use GetEntities or FrameBase.GetEntityGroupIterator to iterate.

Member Function Documentation

◆ Serialize()

static void EntityGroup.Serialize ( void *  ptr,
FrameSerializer  stream 
)
inlinestatic

Serialized the map entity link on the snapshot.

Parameters
ptrPointer to data
streamThe stream to serialize to

◆ Create()

static EntityGroup EntityGroup.Create ( FrameBase  f,
ReadOnlySpan< EntityRef >  entities 
)
inlinestatic

Creates an entity group.

◆ GetEntities()

ReadOnlySpan<EntityRef> EntityGroup.GetEntities ( FrameBase  f)
inline

Returns owned entities. This span becomes invalid if the owner entity is destroyed. It also does not filter for owned entities that have already been destroyed. For more resilience, use FrameBase.GetEntityGroupIterator