Navigation
Unreal Engine C++ API Reference > Runtime > MovieScene > EntitySystem
Inheritance Hierarchy
- FUObjectArray::FUObjectDeleteListener
- FEntityManager
References
Module | MovieScene |
Header | /Engine/Source/Runtime/MovieScene/Public/EntitySystem/MovieSceneEntityManager.h |
Include | #include "EntitySystem/MovieSceneEntityManager.h" |
Syntax
class FEntityManager : public FUObjectArray::FUObjectDeleteListener
Remarks
Top-level manager class that is responsible for all entity data and interaction/
An entity is a stable index into the manager's EntityLocations, which defines the location for that entity's data. This allows the manager to relocate entity data at will without invalidating client held entity IDs. An entity may contain 0 or more components. Components are concrete pieces of data with a unique type identifier. Additionally, tags can be added to entities or whole batches of entities with zero memory overhead.
Entity Component data is stored in allocations organized by each unique combination of components. Each component type is stored as a contiguous array within each allocation, with each entity's component being a fixed offset from the start of each component array. This enables efficient read/write access into specific component arrays and makes issuing parallel tasks that require component data trivial. See FEntityAllocation for a more detailed explanation of entity component data layout.
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
|||
![]() |
FEntityManager
(
const FEntityManager& |
||
![]() |
FEntityManager
(
FEntityManager&& |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | AccumulateMask
(
const FEntityComponentFilter& InFilter, |
Accumulate a mask from all entity types that match the specified filter |
![]() |
void | AddChild
(
FMovieSceneEntityID ParentID, |
Set up an entity to be a child of another. |
![]() |
void | AddComponent
(
FMovieSceneEntityID EntityID, |
Add the specified component value to an entity |
![]() |
void | AddComponent
(
FMovieSceneEntityID EntityID, |
Add the specified component value to an entity |
![]() |
void | AddComponent
(
FMovieSceneEntityID EntityID, |
Add the specified component type to an entity. The component value will be default-initialized. |
![]() |
void | AddComponents
(
FMovieSceneEntityID EntityID, |
Add the specified components to an entity. |
![]() |
void | AddComponents
(
FMovieSceneEntityID EntityID, |
Add the specified components to an entity. |
![]() |
void | Run through all entities in this entity manager, ensuring that all mutual components exist | |
![]() |
void | AddMutualComponents
(
const FEntityComponentFilter& InFilter |
Run through all entities in this entity manager, ensuring that all mutual components exist for any component types that match the specified filter |
![]() |
void | AddReferencedObjects
(
FReferenceCollector& ReferenceCollector |
Explicitly add referenced objects from an external source. |
![]() |
FEntityDataLocation | AllocateContiguousEntities
(
const FComponentMask& EntityComponentMask, |
Attempt to allocate a number of entities of the same type contiguously in memory |
![]() |
FMovieSceneEntityID | Allocate a new entity with no components | |
![]() |
FEntityInfo | AllocateEntity
(
const FComponentMask& EntityComponentMask |
Allocate a single entity with the specified components |
![]() |
void | ChangeEntityType
(
FMovieSceneEntityID InEntity, |
Changes the components that exist on an entity to a new mask |
![]() ![]() |
void | ||
![]() |
void | CombineComponents
(
FMovieSceneEntityID DestinationEntityID, |
Combine the components from one entity into another, overwriting any pre-existing component values. |
![]() |
void | Compact () |
Goes through all entity data and compacts like-for-like allocations into as few allocations as possible, resulting in the optimal data layout |
![]() ![]() |
EEntityThreadingModel | Compute and return this entity manager's threading model. | |
![]() ![]() |
bool | Contains
(
const FEntityComponentFilter& InFilter |
Efficiently test whether this entity manager contains any allocations that match the specified filter |
![]() ![]() |
bool | ContainsAllComponents
(
std::initializer_list< FComponentTypeID > ComponentTypeIDs |
Check whether all of the specified components exist anywhere in this entity manager |
![]() ![]() |
bool | ContainsAnyComponent
(
std::initializer_list< FComponentTypeID > ComponentTypeIDs |
Check whether any entity in this manager has any of the specified components |
![]() ![]() |
bool | ContainsAnyComponent
(
const FComponentMask& ComponentTypeIDs |
Check whether any entity in this manager has any of the specified components |
![]() ![]() |
bool | ContainsComponent
(
FComponentTypeID ComponentTypeID |
Check whether any entity in this manager has the specified component |
![]() |
bool | CopyComponent
(
FMovieSceneEntityID SrcEntityID, |
Copy the specified component type from an entity if it exists. |
![]() |
void | CopyComponents
(
FMovieSceneEntityID SrcEntityID, |
Copy any and all the specified component types from one entity onto another. |
![]() |
void | CountMemory
(
FArchive& Ar, |
Run a serialization routine over the specified entity to approximate the memory it is using |
![]() |
int32 | DefineInstancedChildInitializer
(
TInlineValue< FChildEntityInitializer >&& InInitializer |
Defines a new child initializer that applies only to entities factoried within this entity manager |
![]() |
void | Destroy () |
Destroy this entity manager and all the entities and components contained within it, resetting it back to its default state |
![]() |
void | DestroyInstancedChildInitializer
(
int32 Index |
Destroy a previously registered instanced child initializer using its index |
![]() |
FMovieSceneEntityID | DuplicateEntity
(
FMovieSceneEntityID InOther |
Duplicate an entity, by creating an exact copy with a new ID |
![]() ![]() |
void | Efficiently test whether this entity manager contains any allocations that match the specified filter | |
![]() ![]() |
void | ||
![]() |
void | FilterComponents
(
FMovieSceneEntityID EntityID, |
Remove all but the specified components from an entity. |
![]() ![]() |
IComponentTypeHandler * | FindComponentTypeHandler
(
const FGuid& ComponentGuid |
Find a component type hander from its registered GUID |
![]() |
int32 | FreeEntities
(
const FEntityComponentFilter& Filter, |
Free all entities that match the specified filter |
![]() |
int32 | FreeEntities
(
const FFreeEntityOperation& Operation, |
Free all entities defined by the specified operation |
![]() |
void | FreeEntity
(
FMovieSceneEntityID EntityID |
Free an entity and relinquish its entity ID |
![]() ![]() |
const FComponentMask & | Retrieve an up-to-date accumulation of all components present on entities in this manager | |
![]() ![]() |
void | GetChildren_ParentFirst
(
FMovieSceneEntityID ParentID, |
Retrieve all children, grandchildren etc of the specified entity using a parent first traversal |
![]() ![]() |
FComponentRegistry * | ||
![]() ![]() |
ENamedThreads::Type | ||
![]() ![]() |
FEntityInfo | GetEntity
(
FMovieSceneEntityID EntityID |
Retrieve an entity's allocation and component offset from its ID |
![]() |
FEntityHandle | GetEntityHandle
(
FMovieSceneEntityID EntityID |
Retrieve a handle to an entity |
![]() ![]() |
const FComponentMask & | GetEntityType
(
FMovieSceneEntityID InEntity |
Retrieve the type mask for this component |
![]() ![]() |
ENamedThreads::Type | ||
![]() ![]() |
const FEntityComponentFilter & | Retrieve the entity filter that should be used for any entity iteration. | |
![]() ![]() |
uint32 | ||
![]() ![]() |
void | GetImmediateChildren
(
FMovieSceneEntityID ParentID, |
Retrieve the immediate children of the specified entity |
![]() ![]() |
uint64 | Get the current serial number for any system ovserving this entity manager. | |
![]() ![]() |
EEntityThreadingModel | Get this entitiy manager's current threading model based on the last time UpdateThreadingModel was called. | |
![]() ![]() |
bool | HasComponent
(
FMovieSceneEntityID EntityID, |
Check whether the specified component has a component of the specified type |
![]() ![]() |
bool | HasStructureChangedSince
(
uint64 CachedSerial |
Check whether the structure of this entity manager has changed at all since the specified serial number |
![]() |
void | IncrementSystemSerial
(
uint64 IncAmount |
Increment the current serial number for systems observing this manager. |
![]() |
void | InitializeChildAllocation
(
const FComponentMask& ParentType, |
Runs all initializers for the specified parent/child allocation |
![]() ![]() |
bool | IsAllocated
(
FMovieSceneEntityID EntityID |
Check whether an entity is allocated. |
![]() ![]() |
bool | IsHandleValid
(
FEntityHandle EntityID |
Check whether the specified entity handle is still valid |
![]() ![]() |
bool | IsLockedDown () |
|
![]() ![]() |
FEntityAllocationIteratorProxy | Iterate
(
const FEntityComponentFilter* InFilter |
Iterate through all the allocations that match the specified component filter |
![]() ![]() |
void | IterateChildren_ParentFirst
(
FMovieSceneEntityID ParentID, |
Iterate all children, grandchildren etc of the specified entity using a parent first traversal |
![]() ![]() |
void | IterateImmediateChildren
(
FMovieSceneEntityID ParentID, |
Itereate the immediate children of the specified entity |
![]() |
void | LockDown () |
|
![]() |
void | Called in order to mimic the entity structure changing, even if it has not | |
![]() |
FEntityComponentFilter & | Modify the entity filter that should be used for any entity iteration. | |
![]() |
int32 | MutateAll
(
const FEntityComponentFilter& Filter, |
Efficiently mutate all entities that match a filter. |
![]() |
int32 | MutateConditional
(
const FEntityComponentFilter& Filter, |
Efficiently mutate all entities that match a filter. |
![]() |
void | OverwriteEntityWithDuplicate
(
FMovieSceneEntityID& InOutEntity, |
Duplicate an entity over the top of an existing entity ID |
![]() ![]() |
TComponentLock< TReadOptional< T > > | ReadComponent
(
FMovieSceneEntityID Entity, |
Attempt to read a component from an entity. |
![]() ![]() |
T | ReadComponentChecked
(
FMovieSceneEntityID Entity, |
Read a component value from an entity that is known to exist. |
![]() |
void | ||
![]() |
void | RemoveComponent
(
FMovieSceneEntityID EntityID, |
Remove the specified component type from an entity if it exists. |
![]() |
void | RemoveComponent
(
FMovieSceneEntityID EntityID, |
Remove the specified component type from an entity if it exists. |
![]() |
void | RemoveComponents
(
FMovieSceneEntityID EntityID, |
Remove the specified components from an entity, if they exist. |
![]() |
void | RemoveComponents
(
FMovieSceneEntityID EntityID, |
Remove the specified components from an entity, if they exist. |
![]() |
void | ReplaceEntityID
(
FMovieSceneEntityID& InOutEntity, |
Replace an entity ID with the components from another, discarding the provided entity ID in the process |
![]() |
void | SetComponentRegistry
(
FComponentRegistry* InComponents |
|
![]() |
void | SetDebugName
(
FString&& InNewDebugName |
Set a debug name for this entity manager |
![]() |
void | SetDispatchThread
(
ENamedThreads::Type InDispatchThread |
|
![]() |
void | SetGatherThread
(
ENamedThreads::Type InGatherThread |
|
![]() |
void | TouchEntity
(
FMovieSceneEntityID EntityID |
Touch the specified entity, cause the allocation and component serial numbers to be incremented. |
![]() |
void | Compute and store the current threading model. | |
![]() |
TComponentLock< TWriteOptional< T > > | WriteComponent
(
FMovieSceneEntityID Entity, |
Attempt to write to an entity's component. |
![]() |
void | WriteComponentChecked
(
FMovieSceneEntityID Entity, |
Write a component value that is known to exist to an entity. |
Operators
Type | Name | Description | |
---|---|---|---|
![]() |
void | operator=
(
const FEntityManager& |
|
![]() |
void | operator=
(
FEntityManager&& |
Enums
Type | Name | Description | |
---|---|---|---|
![]() |
ELockdownState | ||
![]() |
EMemoryType |