UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::MovieScene::FEntityManager Class Reference

#include <MovieSceneEntityManager.h>

+ Inheritance diagram for UE::MovieScene::FEntityManager:

Public Member Functions

MOVIESCENE_API FEntityManager ()
 
MOVIESCENE_API ~FEntityManager ()
 
 FEntityManager (const FEntityManager &)=delete
 
void operator= (const FEntityManager &)=delete
 
 FEntityManager (FEntityManager &&)=delete
 
void operator= (FEntityManager &&)=delete
 
FComponentRegistryGetComponents () const
 
void SetComponentRegistry (FComponentRegistry *InComponents)
 
MOVIESCENE_API void Destroy ()
 
MOVIESCENE_API FMovieSceneEntityID AllocateEntity ()
 
MOVIESCENE_API void FreeEntity (FMovieSceneEntityID EntityID)
 
MOVIESCENE_API int32 FreeEntities (const FEntityComponentFilter &Filter, TSet< FMovieSceneEntityID > *OutFreedEntities=nullptr)
 
MOVIESCENE_API int32 FreeEntities (const FFreeEntityOperation &Operation, TSet< FMovieSceneEntityID > *OutFreedEntities=nullptr)
 
MOVIESCENE_API FEntityDataLocation AllocateContiguousEntities (const FComponentMask &EntityComponentMask, int32 *InOutNum)
 
MOVIESCENE_API FEntityInfo AllocateEntity (const FComponentMask &EntityComponentMask)
 
MOVIESCENE_API FEntityInfo GetEntity (FMovieSceneEntityID EntityID) const
 
MOVIESCENE_API FEntityHandle GetEntityHandle (FMovieSceneEntityID EntityID)
 
bool IsAllocated (FMovieSceneEntityID EntityID) const
 
MOVIESCENE_API bool IsHandleValid (FEntityHandle EntityID) const
 
MOVIESCENE_API EEntityThreadingModel ComputeThreadingModel () const
 
MOVIESCENE_API void UpdateThreadingModel ()
 
MOVIESCENE_API EEntityThreadingModel GetThreadingModel () const
 
template<typename T , typename ValueType >
void AddComponent (FMovieSceneEntityID EntityID, TComponentTypeID< T > ComponentTypeID, ValueType &&InValue)
 
MOVIESCENE_API void AddComponent (FMovieSceneEntityID EntityID, FComponentTypeID ComponentTypeID)
 
MOVIESCENE_API void AddComponent (FMovieSceneEntityID EntityID, FComponentTypeID ComponentTypeID, EEntityRecursion Recursion)
 
MOVIESCENE_API void AddComponents (FMovieSceneEntityID EntityID, const FComponentMask &EntityComponentMask)
 
MOVIESCENE_API void AddComponents (FMovieSceneEntityID EntityID, const FComponentMask &EntityComponentMask, EEntityRecursion Recursion)
 
MOVIESCENE_API void RemoveComponent (FMovieSceneEntityID EntityID, FComponentTypeID ComponentTypeID)
 
MOVIESCENE_API void RemoveComponent (FMovieSceneEntityID EntityID, FComponentTypeID ComponentTypeID, EEntityRecursion Recursion)
 
MOVIESCENE_API void RemoveComponents (FMovieSceneEntityID EntityID, const FComponentMask &ComponentsToRemove)
 
MOVIESCENE_API void RemoveComponents (FMovieSceneEntityID EntityID, const FComponentMask &ComponentsToRemove, EEntityRecursion Recursion)
 
MOVIESCENE_API bool CopyComponent (FMovieSceneEntityID SrcEntityID, FMovieSceneEntityID DstEntityID, FComponentTypeID ComponentTypeID)
 
MOVIESCENE_API void CopyComponents (FMovieSceneEntityID SrcEntityID, FMovieSceneEntityID DstEntityID, const FComponentMask &ComponentsToCopy)
 
MOVIESCENE_API bool HasComponent (FMovieSceneEntityID EntityID, FComponentTypeID ComponentTypeID) const
 
MOVIESCENE_API const FComponentMaskGetEntityType (FMovieSceneEntityID InEntity) const
 
MOVIESCENE_API void ChangeEntityType (FMovieSceneEntityID InEntity, const FComponentMask &InNewMask)
 
MOVIESCENE_API void FilterComponents (FMovieSceneEntityID EntityID, const FComponentMask &EntitiesToKeep)
 
MOVIESCENE_API void CombineComponents (FMovieSceneEntityID DestinationEntityID, FMovieSceneEntityID SourceEntityID, const FComponentMask *OptionalMask=nullptr)
 
MOVIESCENE_API FMovieSceneEntityID DuplicateEntity (FMovieSceneEntityID InOther)
 
MOVIESCENE_API void OverwriteEntityWithDuplicate (FMovieSceneEntityID &InOutEntity, FMovieSceneEntityID InEntityToDuplicate)
 
int32 DefineInstancedChildInitializer (TInlineValue< FChildEntityInitializer > &&InInitializer)
 
MOVIESCENE_API void InitializeChildAllocation (const FComponentMask &ParentType, const FComponentMask &ChildType, const FEntityAllocation *ParentAllocation, TArrayView< const int32 > ParentAllocationOffsets, const FEntityRange &InChildEntityRange)
 
void DestroyInstancedChildInitializer (int32 Index)
 
MOVIESCENE_API void AddMutualComponents ()
 
MOVIESCENE_API void AddMutualComponents (const FEntityComponentFilter &InFilter)
 
template<typename T >
TComponentLock< TReadOptional< T > > ReadComponent (FMovieSceneEntityID Entity, TComponentTypeID< T > ComponentTypeID) const
 
template<typename T >
ReadComponentChecked (FMovieSceneEntityID Entity, TComponentTypeID< T > ComponentTypeID) const
 
template<typename T >
TComponentLock< TWriteOptional< T > > WriteComponent (FMovieSceneEntityID Entity, TComponentTypeID< T > ComponentTypeID)
 
template<typename T , typename ValueType >
void WriteComponentChecked (FMovieSceneEntityID Entity, TComponentTypeID< T > ComponentTypeID, ValueType &&Value)
 
void SetGatherThread (ENamedThreads::Type InGatherThread)
 
ENamedThreads::Type GetGatherThread () const
 
void SetDispatchThread (ENamedThreads::Type InDispatchThread)
 
ENamedThreads::Type GetDispatchThread () const
 
MOVIESCENE_API void Compact ()
 
MOVIESCENE_API int32 MutateAll (const FEntityComponentFilter &Filter, const IMovieSceneEntityMutation &Mutation, EMutuallyInclusiveComponentType MutualTypes=EMutuallyInclusiveComponentType::Mandatory)
 
MOVIESCENE_API int32 MutateConditional (const FEntityComponentFilter &Filter, const IMovieSceneConditionalEntityMutation &Mutation, EMutuallyInclusiveComponentType MutualTypes=EMutuallyInclusiveComponentType::Mandatory)
 
MOVIESCENE_API void TouchEntity (FMovieSceneEntityID EntityID)
 
MOVIESCENE_API void AddChild (FMovieSceneEntityID ParentID, FMovieSceneEntityID ChildID)
 
MOVIESCENE_API void GetImmediateChildren (FMovieSceneEntityID ParentID, TArray< FMovieSceneEntityID > &OutChildren) const
 
MOVIESCENE_API void GetChildren_ParentFirst (FMovieSceneEntityID ParentID, TArray< FMovieSceneEntityID > &OutChildren) const
 
template<typename IteratorType >
void IterateImmediateChildren (FMovieSceneEntityID ParentID, IteratorType &&Iterator) const
 
template<typename IteratorType >
void IterateChildren_ParentFirst (FMovieSceneEntityID ParentID, IteratorType &&Iterator) const
 
MOVIESCENE_API void CountMemory (FArchive &Ar, FMovieSceneEntityID EntityID)
 
MOVIESCENE_API FEntityAllocationIteratorProxy Iterate (const FEntityComponentFilter *InFilter) const
 
MOVIESCENE_API bool Contains (const FEntityComponentFilter &InFilter) const
 
bool ContainsComponent (FComponentTypeID ComponentTypeID) const
 
bool ContainsAnyComponent (std::initializer_list< FComponentTypeID > ComponentTypeIDs) const
 
bool ContainsAnyComponent (const FComponentMask &ComponentTypeIDs) const
 
bool ContainsAllComponents (std::initializer_list< FComponentTypeID > ComponentTypeIDs) const
 
MOVIESCENE_API void AccumulateMask (const FEntityComponentFilter &InFilter, FComponentMask &OutMask) const
 
MOVIESCENE_API const FComponentMaskGetAccumulatedMask () const
 
MOVIESCENE_API void EnterIteration () const
 
MOVIESCENE_API void ExitIteration () const
 
void CheckCanChangeStructure () const
 
bool IsLockedDown () const
 
void LockDown ()
 
void ReleaseLockDown ()
 
const FEntityComponentFilterGetGlobalIterationFilter () const
 
FEntityComponentFilterModifyGlobalIterationFilter ()
 
void IncrementSystemSerial (uint64 IncAmount=1)
 
uint64 GetSystemSerial () const
 
bool HasStructureChangedSince (uint64 CachedSerial) const
 
void MimicStructureChanged ()
 
void SetDebugName (FString &&InNewDebugName)
 
MOVIESCENE_API void AddReferencedObjects (FReferenceCollector &ReferenceCollector)
 
MOVIESCENE_API void ReplaceEntityID (FMovieSceneEntityID &InOutEntity, FMovieSceneEntityID EntityToDiscard)
 
uint32 GetHandleGeneration () const
 
- Public Member Functions inherited from FUObjectArray::FUObjectDeleteListener
virtual ~FUObjectDeleteListener ()
 
virtual void NotifyUObjectDeleted (const class UObjectBase *Object, int32 Index)=0
 

Static Public Member Functions

static MOVIESCENE_API IComponentTypeHandlerFindComponentTypeHandler (const FGuid &ComponentGuid)
 

Friends

struct FEntityInitializer
 
struct FEntityAllocationProxy
 
struct FEntityAllocationIterator
 
struct FEntityAllocationIteratorProxy
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ FEntityManager() [1/3]

UE::MovieScene::FEntityManager::FEntityManager ( )

◆ ~FEntityManager()

UE::MovieScene::FEntityManager::~FEntityManager ( )

◆ FEntityManager() [2/3]

UE::MovieScene::FEntityManager::FEntityManager ( const FEntityManager )
delete

◆ FEntityManager() [3/3]

UE::MovieScene::FEntityManager::FEntityManager ( FEntityManager &&  )
delete

Member Function Documentation

◆ AccumulateMask()

void UE::MovieScene::FEntityManager::AccumulateMask ( const FEntityComponentFilter InFilter,
FComponentMask OutMask 
) const

Accumulate a mask from all entity types that match the specified filter

Parameters
InFilterThe filter to match allocations against. Filter is copied into the iterator.
OutMaskThe mask to receive the binary OR accumulation of all entities that pass the filter

◆ AddChild()

void UE::MovieScene::FEntityManager::AddChild ( FMovieSceneEntityID  ParentID,
FMovieSceneEntityID  ChildID 
)

Set up an entity to be a child of another. Child entities will only be cleaned up if their parents are marked Unlink, and TagOrphanedChildren is called

Parameters
ParentIDThe ID of the parent
ChildIDThe ID of the child

◆ AddComponent() [1/3]

void UE::MovieScene::FEntityManager::AddComponent ( FMovieSceneEntityID  EntityID,
FComponentTypeID  ComponentTypeID 
)

Add the specified component type to an entity. The component value will be default-initialized.

Parameters
EntityIDThe ID of the entity to add the component to
ComponentTypeIDThe ID of the component type to add to the entity

◆ AddComponent() [2/3]

void UE::MovieScene::FEntityManager::AddComponent ( FMovieSceneEntityID  EntityID,
FComponentTypeID  ComponentTypeID,
EEntityRecursion  Recursion 
)

◆ AddComponent() [3/3]

template<typename T , typename ValueType >
void UE::MovieScene::FEntityManager::AddComponent ( FMovieSceneEntityID  EntityID,
TComponentTypeID< T >  ComponentTypeID,
ValueType &&  InValue 
)
inline

Add the specified component value to an entity

Parameters
EntityIDThe ID of the entity to add the component to
ComponentTypeIDThe ID of the component type to add to the entity
InValueThe value of the component to add

◆ AddComponents() [1/2]

void UE::MovieScene::FEntityManager::AddComponents ( FMovieSceneEntityID  EntityID,
const FComponentMask EntityComponentMask 
)

Add the specified components to an entity. Existing components will remain unchanged. New component values will be default-initialized.

Parameters
EntityIDThe ID of the entity to add the components to
EntityComponentMaskA mask constituting the components that should be added (set bits indicate components to add)

◆ AddComponents() [2/2]

void UE::MovieScene::FEntityManager::AddComponents ( FMovieSceneEntityID  EntityID,
const FComponentMask EntityComponentMask,
EEntityRecursion  Recursion 
)

◆ AddMutualComponents() [1/2]

void UE::MovieScene::FEntityManager::AddMutualComponents ( )

Run through all entities in this entity manager, ensuring that all mutual components exist

◆ AddMutualComponents() [2/2]

void UE::MovieScene::FEntityManager::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

◆ AddReferencedObjects()

void UE::MovieScene::FEntityManager::AddReferencedObjects ( FReferenceCollector ReferenceCollector)

Explicitly add referenced objects from an external source. This is not called by default for the global entity manager because each entity owner should do so to avoid cyclic dependencies.

◆ AllocateContiguousEntities()

FEntityDataLocation UE::MovieScene::FEntityManager::AllocateContiguousEntities ( const FComponentMask EntityComponentMask,
int32 InOutNum 
)

Attempt to allocate a number of entities of the same type contiguously in memory

Note
May allocate fewer than the desired number due to allocation capacity constraints. As such, subsequent calls may be required.
Parameters
EntityComponentMaskDefines the components that should exist on the allocated components. Set bits denote allocated components and tags.
InOutNumA valid pointer to the desired number to allocate. Is overwritten with the number that were actually allocated.
Returns
A structure that points to the first entity that was allocated.

◆ AllocateEntity() [1/2]

FMovieSceneEntityID UE::MovieScene::FEntityManager::AllocateEntity ( )

Allocate a new entity with no components

Returns
A stable ID that relates to this entity. Will remain valid until the entity is freed

◆ AllocateEntity() [2/2]

FEntityInfo UE::MovieScene::FEntityManager::AllocateEntity ( const FComponentMask EntityComponentMask)

Allocate a single entity with the specified components

Parameters
EntityComponentMaskDefines the components that should exist on the allocated components. Set bits denote allocated components and tags.
Returns
A structure that points to the allocated entity.

◆ ChangeEntityType()

void UE::MovieScene::FEntityManager::ChangeEntityType ( FMovieSceneEntityID  InEntity,
const FComponentMask InNewMask 
)

Changes the components that exist on an entity to a new mask

Parameters
InEntityThe ID of the entity
InNewMaskThe new mask of the entity that defines which components it should have

◆ CheckCanChangeStructure()

void UE::MovieScene::FEntityManager::CheckCanChangeStructure ( ) const
inline

◆ CombineComponents()

void UE::MovieScene::FEntityManager::CombineComponents ( FMovieSceneEntityID  DestinationEntityID,
FMovieSceneEntityID  SourceEntityID,
const FComponentMask OptionalMask = nullptr 
)

Combine the components from one entity into another, overwriting any pre-existing component values. Does not free any entities.

Parameters
DestinationEntityIDThe ID of the entity to add new components to
SourceEntityIDThe ID of the entity to copy components from
OptionalMask(Optional) A mask constituting the components that should be copied

◆ Compact()

void UE::MovieScene::FEntityManager::Compact ( )

Goes through all entity data and compacts like-for-like allocations into as few allocations as possible, resulting in the optimal data layout

◆ ComputeThreadingModel()

EEntityThreadingModel UE::MovieScene::FEntityManager::ComputeThreadingModel ( ) const

Compute and return this entity manager's threading model. Does not change the current cached threading model.

◆ Contains()

bool UE::MovieScene::FEntityManager::Contains ( const FEntityComponentFilter InFilter) const

Efficiently test whether this entity manager contains any allocations that match the specified filter

Parameters
InFilterThe filter to match allocations against.
Returns
True if the entity manager contains any allocations that match the filter, false otherwise

◆ ContainsAllComponents()

bool UE::MovieScene::FEntityManager::ContainsAllComponents ( std::initializer_list< FComponentTypeID ComponentTypeIDs) const
inline

Check whether all of the specified components exist anywhere in this entity manager

Note
: Does not check whether the components exist on the same entity, just that they are present in the manager. Use Contains for a thorough filter match.
Parameters
ComponentTypeIDsThe types of the components that are being tested for
Returns
true if each of the specified components exist anywhere in this manager, false otherwise

◆ ContainsAnyComponent() [1/2]

bool UE::MovieScene::FEntityManager::ContainsAnyComponent ( const FComponentMask ComponentTypeIDs) const
inline

Check whether any entity in this manager has any of the specified components

Parameters
ComponentTypeIDsThe types of the component that are being tested for
Returns
true if any one of the specified components exist anywhere in this manager, false otherwise

◆ ContainsAnyComponent() [2/2]

bool UE::MovieScene::FEntityManager::ContainsAnyComponent ( std::initializer_list< FComponentTypeID ComponentTypeIDs) const
inline

Check whether any entity in this manager has any of the specified components

Parameters
ComponentTypeIDsThe types of the component that are being tested for
Returns
true if any one of the specified components exist anywhere in this manager, false otherwise

◆ ContainsComponent()

bool UE::MovieScene::FEntityManager::ContainsComponent ( FComponentTypeID  ComponentTypeID) const
inline

Check whether any entity in this manager has the specified component

Parameters
ComponentTypeIDThe type of the component that is being tested for
Returns
true if the specified component exists anywhere, false otherwise

◆ CopyComponent()

bool UE::MovieScene::FEntityManager::CopyComponent ( FMovieSceneEntityID  SrcEntityID,
FMovieSceneEntityID  DstEntityID,
FComponentTypeID  ComponentTypeID 
)

Copy the specified component type from an entity if it exists.

Parameters
SrcEntityIDThe ID of the entity to copy from
DstEntityIDThe ID of the entity to copy to
ComponentTypeIDThe ID of the component type to copy. Must exist on SrcEntityID

◆ CopyComponents()

void UE::MovieScene::FEntityManager::CopyComponents ( FMovieSceneEntityID  SrcEntityID,
FMovieSceneEntityID  DstEntityID,
const FComponentMask ComponentsToCopy 
)

Copy any and all the specified component types from one entity onto another. Missing components on the source entity are handled gracefully.

Parameters
SrcEntityIDThe ID of the entity to copy from
DstEntityIDThe ID of the entity to copy to
ComponentsToCopyA mask constituting the components that should be copied (set bits indicate components to copy)

◆ CountMemory()

MOVIESCENE_API void UE::MovieScene::FEntityManager::CountMemory ( FArchive Ar,
FMovieSceneEntityID  EntityID 
)

Run a serialization routine over the specified entity to approximate the memory it is using

Note
Does not consider per-allocation overhead such as header sizes and other per-allocation meta-data
Parameters
ArThe archive to save to. Ar.IsCountingMemory() must be true.
EntityIDIdentifier for the entity to replace object references within

◆ DefineInstancedChildInitializer()

int32 UE::MovieScene::FEntityManager::DefineInstancedChildInitializer ( TInlineValue< FChildEntityInitializer > &&  InInitializer)
inline

Defines a new child initializer that applies only to entities factoried within this entity manager

Parameters
InInitializerThe initializer to insert
Returns
An index into the array of initializers that should be used for removal

◆ Destroy()

void UE::MovieScene::FEntityManager::Destroy ( )

Destroy this entity manager and all the entities and components contained within it, resetting it back to its default state

◆ DestroyInstancedChildInitializer()

void UE::MovieScene::FEntityManager::DestroyInstancedChildInitializer ( int32  Index)
inline

Destroy a previously registered instanced child initializer using its index

◆ DuplicateEntity()

FMovieSceneEntityID UE::MovieScene::FEntityManager::DuplicateEntity ( FMovieSceneEntityID  InOther)

Duplicate an entity, by creating an exact copy with a new ID

Parameters
InOtherThe ID of the entity to duplicate
Returns
An ID to a new entity that has exactly the same combination and value of components as InOther

◆ EnterIteration()

void UE::MovieScene::FEntityManager::EnterIteration ( ) const

Efficiently test whether this entity manager contains any allocations that match the specified filter

Parameters
InFilterThe filter to match allocations against.
Returns
True if the entity manager contains any allocations that match the filter, false otherwise

◆ ExitIteration()

void UE::MovieScene::FEntityManager::ExitIteration ( ) const

◆ FilterComponents()

void UE::MovieScene::FEntityManager::FilterComponents ( FMovieSceneEntityID  EntityID,
const FComponentMask EntitiesToKeep 
)

Remove all but the specified components from an entity.

Parameters
EntityIDThe ID of the entity to remove the components from
EntitiesToKeepA mask constituting the components that should be kept on the entity

◆ FindComponentTypeHandler()

static MOVIESCENE_API IComponentTypeHandler * UE::MovieScene::FEntityManager::FindComponentTypeHandler ( const FGuid ComponentGuid)
static

Find a component type hander from its registered GUID

◆ FreeEntities() [1/2]

int32 UE::MovieScene::FEntityManager::FreeEntities ( const FEntityComponentFilter Filter,
TSet< FMovieSceneEntityID > *  OutFreedEntities = nullptr 
)

Free all entities that match the specified filter

Parameters
FilterA filter that defines the entities to free. Any entity that passes the filter will be destroyed.
OutFreedEntities(Optional) A set to populate with all the entities that were freed (including any children)
Returns
The number of entities released

◆ FreeEntities() [2/2]

int32 UE::MovieScene::FEntityManager::FreeEntities ( const FFreeEntityOperation Operation,
TSet< FMovieSceneEntityID > *  OutFreedEntities = nullptr 
)

Free all entities defined by the specified operation

Parameters
OperationA pre-populated free entity operation definition
OutFreedEntities(Optional) A set to populate with all the entities that were freed (including any children)
Returns
The number of entities released

◆ FreeEntity()

void UE::MovieScene::FEntityManager::FreeEntity ( FMovieSceneEntityID  EntityID)

Free an entity and relinquish its entity ID

Parameters
EntityIDA valid entity ID to free
Returns
The number of entities released

◆ GetAccumulatedMask()

const FComponentMask & UE::MovieScene::FEntityManager::GetAccumulatedMask ( ) const

Retrieve an up-to-date accumulation of all components present on entities in this manager

◆ GetChildren_ParentFirst()

void UE::MovieScene::FEntityManager::GetChildren_ParentFirst ( FMovieSceneEntityID  ParentID,
TArray< FMovieSceneEntityID > &  OutChildren 
) const

Retrieve all children, grandchildren etc of the specified entity using a parent first traversal

Note
: the array will not be emptied by this function - that is the responsibility of the callee, if desired.
Parameters
ParentIDThe ID of the parent
OutChildren(out) Array to populate with child entities.

◆ GetComponents()

FComponentRegistry * UE::MovieScene::FEntityManager::GetComponents ( ) const
inline

◆ GetDispatchThread()

ENamedThreads::Type UE::MovieScene::FEntityManager::GetDispatchThread ( ) const
inline

◆ GetEntity()

FEntityInfo UE::MovieScene::FEntityManager::GetEntity ( FMovieSceneEntityID  EntityID) const

Retrieve an entity's allocation and component offset from its ID

Returns
A structure that points to the allocated entity.

◆ GetEntityHandle()

FEntityHandle UE::MovieScene::FEntityManager::GetEntityHandle ( FMovieSceneEntityID  EntityID)

Retrieve a handle to an entity

Returns
A handle that points to the allocated entity.

◆ GetEntityType()

const FComponentMask & UE::MovieScene::FEntityManager::GetEntityType ( FMovieSceneEntityID  InEntity) const

Retrieve the type mask for this component

Parameters
InEntityThe ID of the entity
Returns
The type mask for this entity, or an empty mask if it has no components

◆ GetGatherThread()

ENamedThreads::Type UE::MovieScene::FEntityManager::GetGatherThread ( ) const
inline

◆ GetGlobalIterationFilter()

const FEntityComponentFilter & UE::MovieScene::FEntityManager::GetGlobalIterationFilter ( ) const
inline

Retrieve the entity filter that should be used for any entity iteration. Can be used to constrain all iterations to specific types

◆ GetHandleGeneration()

uint32 UE::MovieScene::FEntityManager::GetHandleGeneration ( ) const
inline

◆ GetImmediateChildren()

void UE::MovieScene::FEntityManager::GetImmediateChildren ( FMovieSceneEntityID  ParentID,
TArray< FMovieSceneEntityID > &  OutChildren 
) const

Retrieve the immediate children of the specified entity

Note
: the array will not be emptied by this function - that is the responsibility of the callee, if desired.
Parameters
ParentIDThe ID of the parent
OutChildren(out) Array to populate with child entities.

◆ GetSystemSerial()

uint64 UE::MovieScene::FEntityManager::GetSystemSerial ( ) const
inline

Get the current serial number for any system ovserving this entity manager. This serial number acts as a timestamp for the current state of this entity manager - any serial number more recent than this dictates more recent logic or state.

◆ GetThreadingModel()

EEntityThreadingModel UE::MovieScene::FEntityManager::GetThreadingModel ( ) const

Get this entitiy manager's current threading model based on the last time UpdateThreadingModel was called.

◆ HasComponent()

bool UE::MovieScene::FEntityManager::HasComponent ( FMovieSceneEntityID  EntityID,
FComponentTypeID  ComponentTypeID 
) const

Check whether the specified component has a component of the specified type

Parameters
EntityIDThe ID of the entity to check
ComponentTypeIDThe type of the component that is being tested for

◆ HasStructureChangedSince()

bool UE::MovieScene::FEntityManager::HasStructureChangedSince ( uint64  CachedSerial) const
inline

Check whether the structure of this entity manager has changed at all since the specified serial number

◆ IncrementSystemSerial()

void UE::MovieScene::FEntityManager::IncrementSystemSerial ( uint64  IncAmount = 1)
inline

Increment the current serial number for systems observing this manager. Should be called after any system is run

◆ InitializeChildAllocation()

void UE::MovieScene::FEntityManager::InitializeChildAllocation ( const FComponentMask ParentType,
const FComponentMask ChildType,
const FEntityAllocation ParentAllocation,
TArrayView< const int32 ParentAllocationOffsets,
const FEntityRange InChildEntityRange 
)

Runs all initializers for the specified parent/child allocation

◆ IsAllocated()

bool UE::MovieScene::FEntityManager::IsAllocated ( FMovieSceneEntityID  EntityID) const
inline

Check whether an entity is allocated.

Note
: does not check serial numbers - should only be used when you are certain that another entity can not have been allocated over the top of the specified entity ID
Returns
true if the entity ID is allocated, false otherwise

◆ IsHandleValid()

bool UE::MovieScene::FEntityManager::IsHandleValid ( FEntityHandle  EntityID) const

Check whether the specified entity handle is still valid

Returns
true if the entity ID is allocated, false otherwise

◆ IsLockedDown()

bool UE::MovieScene::FEntityManager::IsLockedDown ( ) const
inline

◆ Iterate()

FEntityAllocationIteratorProxy UE::MovieScene::FEntityManager::Iterate ( const FEntityComponentFilter InFilter) const

Iterate through all the allocations that match the specified component filter

Parameters
InFilter(required, non-null) The filter to match allocations against. Filter is copied into the iterator.
Returns
An iterator object that walks over all allocations matching the filter.

◆ IterateChildren_ParentFirst()

template<typename IteratorType >
void UE::MovieScene::FEntityManager::IterateChildren_ParentFirst ( FMovieSceneEntityID  ParentID,
IteratorType &&  Iterator 
) const
inline

Iterate all children, grandchildren etc of the specified entity using a parent first traversal

Parameters
ParentIDThe ID of the parent
OutChildren(out) Array to populate with child entities.

◆ IterateImmediateChildren()

template<typename IteratorType >
void UE::MovieScene::FEntityManager::IterateImmediateChildren ( FMovieSceneEntityID  ParentID,
IteratorType &&  Iterator 
) const
inline

Itereate the immediate children of the specified entity

Note
: the array will not be emptied by this function - that is the responsibility of the callee, if desired.
Parameters
ParentIDThe ID of the parent
OutChildren(out) Array to populate with child entities.

◆ LockDown()

void UE::MovieScene::FEntityManager::LockDown ( )
inline

◆ MimicStructureChanged()

void UE::MovieScene::FEntityManager::MimicStructureChanged ( )
inline

Called in order to mimic the entity structure changing, even if it has not

◆ ModifyGlobalIterationFilter()

FEntityComponentFilter & UE::MovieScene::FEntityManager::ModifyGlobalIterationFilter ( )
inline

Modify the entity filter that should be used for any entity iteration.

Note
: Care should be take to reset this back to its original state when done, as leaving this populated during the instantiation phase can result in undefined results.

◆ MutateAll()

int32 UE::MovieScene::FEntityManager::MutateAll ( const FEntityComponentFilter Filter,
const IMovieSceneEntityMutation Mutation,
EMutuallyInclusiveComponentType  MutualTypes = EMutuallyInclusiveComponentType::Mandatory 
)

Efficiently mutate all entities that match a filter. Mutations can add or remove components from batches of entity data.

Parameters
FilterThe filter to match entity allocations against. Only entities that match the filter will be mutated
MutationImplementation that defines how to mutate the entities that match the filter
Returns
The number of entities that were mutated, or 0 if none were matched

◆ MutateConditional()

int32 UE::MovieScene::FEntityManager::MutateConditional ( const FEntityComponentFilter Filter,
const IMovieSceneConditionalEntityMutation Mutation,
EMutuallyInclusiveComponentType  MutualTypes = EMutuallyInclusiveComponentType::Mandatory 
)

Efficiently mutate all entities that match a filter. Mutations can add or remove components from batches of entity data.

Parameters
FilterThe filter to match entity allocations against. Only entities that match the filter will be mutated
MutationImplementation that defines how to mutate the entities that match the filter
Returns
The number of entities that were mutated, or 0 if none were matched

◆ operator=() [1/2]

void UE::MovieScene::FEntityManager::operator= ( const FEntityManager )
delete

◆ operator=() [2/2]

void UE::MovieScene::FEntityManager::operator= ( FEntityManager &&  )
delete

◆ OverwriteEntityWithDuplicate()

void UE::MovieScene::FEntityManager::OverwriteEntityWithDuplicate ( FMovieSceneEntityID InOutEntity,
FMovieSceneEntityID  InEntityToDuplicate 
)

Duplicate an entity over the top of an existing entity ID

Parameters
InOutEntityThe ID of the entity to overwrite. Doesn't have to be valid.
InEntityToDuplicateThe ID of the entity to duplicate

◆ ReadComponent()

template<typename T >
TComponentLock< TReadOptional< T > > UE::MovieScene::FEntityManager::ReadComponent ( FMovieSceneEntityID  Entity,
TComponentTypeID< T >  ComponentTypeID 
) const
inline

Attempt to read a component from an entity.

Note
this is a general purpose convenience utility which should not be used for high-performance runtime code. See FEntityTaskBuilder.
Parameters
EntityThe ID of the entity to read from
ComponentTypeIDThe component that is to be read
Returns
A scoped component ptr that points directly to the entity's component, or nullptr if it does not exist

◆ ReadComponentChecked()

template<typename T >
T UE::MovieScene::FEntityManager::ReadComponentChecked ( FMovieSceneEntityID  Entity,
TComponentTypeID< T >  ComponentTypeID 
) const
inline

Read a component value from an entity that is known to exist.

Note
this is a general purpose convenience utility which should not be used for high-performance runtime code. See FEntityTaskBuilder.
Parameters
EntityThe ID of the entity to read from
ComponentTypeIDThe component that is to be read
Returns
The component value

◆ ReleaseLockDown()

void UE::MovieScene::FEntityManager::ReleaseLockDown ( )
inline

◆ RemoveComponent() [1/2]

void UE::MovieScene::FEntityManager::RemoveComponent ( FMovieSceneEntityID  EntityID,
FComponentTypeID  ComponentTypeID 
)

Remove the specified component type from an entity if it exists.

Parameters
EntityIDThe ID of the entity to remove the component from
ComponentTypeIDThe ID of the component type to remove from the entity

◆ RemoveComponent() [2/2]

void UE::MovieScene::FEntityManager::RemoveComponent ( FMovieSceneEntityID  EntityID,
FComponentTypeID  ComponentTypeID,
EEntityRecursion  Recursion 
)

◆ RemoveComponents() [1/2]

void UE::MovieScene::FEntityManager::RemoveComponents ( FMovieSceneEntityID  EntityID,
const FComponentMask ComponentsToRemove 
)

Remove the specified components from an entity, if they exist.

Parameters
EntityIDThe ID of the entity to remove the components from
ComponentsToRemoveA mask constituting the components that should be removed (set bits indicate components to add)

◆ RemoveComponents() [2/2]

void UE::MovieScene::FEntityManager::RemoveComponents ( FMovieSceneEntityID  EntityID,
const FComponentMask ComponentsToRemove,
EEntityRecursion  Recursion 
)

◆ ReplaceEntityID()

void UE::MovieScene::FEntityManager::ReplaceEntityID ( FMovieSceneEntityID InOutEntity,
FMovieSceneEntityID  EntityToDiscard 
)

Replace an entity ID with the components from another, discarding the provided entity ID in the process

Parameters
InOutEntityThe entity ID to be reassigned. If it is already valid, the existing entity will be freed
EntityToDiscardThe entity containing the components to replace InOutEntity with. This Entity ID will be invalid after this function call.

◆ SetComponentRegistry()

void UE::MovieScene::FEntityManager::SetComponentRegistry ( FComponentRegistry InComponents)
inline

◆ SetDebugName()

void UE::MovieScene::FEntityManager::SetDebugName ( FString &&  InNewDebugName)
inline

Set a debug name for this entity manager

◆ SetDispatchThread()

void UE::MovieScene::FEntityManager::SetDispatchThread ( ENamedThreads::Type  InDispatchThread)
inline

◆ SetGatherThread()

void UE::MovieScene::FEntityManager::SetGatherThread ( ENamedThreads::Type  InGatherThread)
inline

◆ TouchEntity()

void UE::MovieScene::FEntityManager::TouchEntity ( FMovieSceneEntityID  EntityID)

Touch the specified entity, cause the allocation and component serial numbers to be incremented. Will invalidate any transient caches maintained for serial such numbers.

Note
Allocation and component serial numbers relate to the entire allocation of entities that this entity resides within. As such, it will invalidate downstream caches for any cache that relates to the entire allocation
Parameters
EntityIDThe ID of the entity to touch.

◆ UpdateThreadingModel()

void UE::MovieScene::FEntityManager::UpdateThreadingModel ( )

Compute and store the current threading model.

◆ WriteComponent()

template<typename T >
TComponentLock< TWriteOptional< T > > UE::MovieScene::FEntityManager::WriteComponent ( FMovieSceneEntityID  Entity,
TComponentTypeID< T >  ComponentTypeID 
)
inline

Attempt to write to an entity's component.

Note
this is a general purpose convenience utility which should not be used for high-performance runtime code. See FEntityTaskBuilder.
Parameters
EntityThe ID of the entity to read from
ComponentTypeIDThe component that is to be read
Returns
A scoped component ptr that points directly to the entity's component, or nullptr if it does not exist

◆ WriteComponentChecked()

template<typename T , typename ValueType >
void UE::MovieScene::FEntityManager::WriteComponentChecked ( FMovieSceneEntityID  Entity,
TComponentTypeID< T >  ComponentTypeID,
ValueType &&  Value 
)
inline

Write a component value that is known to exist to an entity.

Note
this is a general purpose convenience utility which should not be used for high-performance runtime code. See FEntityTaskBuilder.
Parameters
EntityThe ID of the entity to read from
ComponentTypeIDThe component that is to be read
ValueThe value to write

Friends And Related Symbol Documentation

◆ FEntityAllocationIterator

◆ FEntityAllocationIteratorProxy

◆ FEntityAllocationProxy

◆ FEntityInitializer


The documentation for this class was generated from the following files: