engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | 所有成员列表
UE::MovieScene::FEntityManager类 参考

Top-level manager class that is responsible for all entity data and interaction/ 更多...

#include <MovieSceneEntityManager.h>

+ 类 UE::MovieScene::FEntityManager 继承关系图:

Public 成员函数

void AccumulateMask (const FEntityComponentFilter &InFilter, FComponentMask &OutMask) const
 Accumulate a mask from all entity types that match the specified filter 更多...
 
void AddChild (FMovieSceneEntityID ParentID, FMovieSceneEntityID ChildID)
 Set up an entity to be a child of another. 更多...
 
void AddComponent (FMovieSceneEntityID EntityID, FComponentTypeID ComponentTypeID)
 Add the specified component type to an entity. 更多...
 
template<typename T , typename ValueType >
void AddComponent (FMovieSceneEntityID EntityID, TComponentTypeID< T > ComponentTypeID, ValueType &&InValue)
 Add the specified component value to an entity 更多...
 
void AddComponents (FMovieSceneEntityID EntityID, const FComponentMask &EntityComponentMask)
 Add the specified components to an entity. 更多...
 
void AddMutualComponents ()
 Run through all entities in this entity manager, ensuring that all mutual components exist
 
void AddReferencedObjects (FReferenceCollector &ReferenceCollector)
 Explicitly add referenced objects from an external source. 更多...
 
FEntityDataLocation AllocateContiguousEntities (const FComponentMask &EntityComponentMask, int32 *InOutNum)
 Attempt to allocate a number of entities of the same type contiguously in memory 更多...
 
FMovieSceneEntityID AllocateEntity ()
 Allocate a new entity with no components 更多...
 
FEntityInfo AllocateEntity (const FComponentMask &EntityComponentMask)
 Allocate a single entity with the specified components 更多...
 
void ChangeEntityType (FMovieSceneEntityID InEntity, const FComponentMask &InNewMask)
 Changes the components that exist on an entity to a new mask 更多...
 
void CombineComponents (FMovieSceneEntityID DestinationEntityID, FMovieSceneEntityID SourceEntityID, const FComponentMask *OptionalMask=nullptr)
 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
 
bool Contains (const FEntityComponentFilter &InFilter) const
 Efficiently test whether this entity manager contains any allocations that match the specified filter 更多...
 
bool ContainsAllComponents (std::initializer_list< FComponentTypeID > ComponentTypeIDs) const
 Check whether all of the specified components exist anywhere in this entity manager 更多...
 
bool ContainsAnyComponent (std::initializer_list< FComponentTypeID > ComponentTypeIDs) const
 Check whether any entity in this manager has any of the specified components 更多...
 
bool ContainsComponent (FComponentTypeID ComponentTypeID) const
 Check whether any entity in this manager has the specified component 更多...
 
bool CopyComponent (FMovieSceneEntityID SrcEntityID, FMovieSceneEntityID DstEntityID, FComponentTypeID ComponentTypeID)
 Copy the specified component type from an entity if it exists. 更多...
 
void CopyComponents (FMovieSceneEntityID SrcEntityID, FMovieSceneEntityID DstEntityID, const FComponentMask &ComponentsToCopy)
 Copy any and all the specified component types from one entity onto another. 更多...
 
void CountMemory (FArchive &Ar, FMovieSceneEntityID EntityID)
 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 EnterIteration () const
 Efficiently test whether this entity manager contains any allocations that match the specified filter 更多...
 
void FilterComponents (FMovieSceneEntityID EntityID, const FComponentMask &EntitiesToKeep)
 Remove all but the specified components from an entity. 更多...
 
int32 FreeEntities (const FEntityComponentFilter &Filter, TSet< FMovieSceneEntityID > *OutFreedEntities=nullptr)
 Free all entities that match the specified filter 更多...
 
int32 FreeEntities (const FFreeEntityOperation &Operation, TSet< FMovieSceneEntityID > *OutFreedEntities=nullptr)
 Free all entities defined by the specified operation 更多...
 
void FreeEntity (FMovieSceneEntityID EntityID)
 Free an entity and relinquish its entity ID 更多...
 
const FComponentMask & GetAccumulatedMask () const
 Retrieve an up-to-date accumulation of all components present on entities in this manager
 
void GetChildren_ParentFirst (FMovieSceneEntityID ParentID, TArray< FMovieSceneEntityID > &OutChildren) const
 Retrieve all children, grandchildren etc of the specified entity using a parent first traversal 更多...
 
FEntityInfo GetEntity (FMovieSceneEntityID EntityID) const
 Retrieve an entity's allocation and component offset from its ID 更多...
 
FEntityHandle GetEntityHandle (FMovieSceneEntityID EntityID)
 Retrieve a handle to an entity 更多...
 
FComponentMask GetEntityType (FMovieSceneEntityID InEntity) const
 Retrieve the type mask for this component 更多...
 
void GetImmediateChildren (FMovieSceneEntityID ParentID, TArray< FMovieSceneEntityID > &OutChildren) const
 Retrieve the immediate children of the specified entity 更多...
 
uint64 GetSystemSerial () const
 Get the current serial number for any system ovserving this entity manager. 更多...
 
EEntityThreadingModel GetThreadingModel () const
 Compute and retrieve this entity manager's threading model
 
bool HasComponent (FMovieSceneEntityID EntityID, FComponentTypeID ComponentTypeID) const
 Check whether the specified component has a component of the specified type 更多...
 
bool HasStructureChangedSince (uint64 CachedSerial) const
 Check whether the structure of this entity manager has changed at all since the specified serial number
 
void IncrementSystemSerial ()
 Increment the current serial number for systems observing this manager. 更多...
 
void 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
 
void InitializeMutualComponents (FMovieSceneEntityID EntityID)
 Initialize a single entity using the mutual initializers
 
bool IsAllocated (FMovieSceneEntityID EntityID) const
 Check whether an entity is allocated. 更多...
 
bool IsHandleValid (FEntityHandle EntityID) const
 Check whether the specified entity handle is still valid 更多...
 
FEntityAllocationIteratorProxy Iterate (const FEntityComponentFilter *InFilter) const
 Iterate through all the allocations that match the specified component filter 更多...
 
template<typename IteratorType >
void IterateChildren_ParentFirst (FMovieSceneEntityID ParentID, IteratorType &&Iterator) const
 Iterate all children, grandchildren etc of the specified entity using a parent first traversal 更多...
 
template<typename IteratorType >
void IterateImmediateChildren (FMovieSceneEntityID ParentID, IteratorType &&Iterator) const
 Itereate the immediate children of the specified entity 更多...
 
void MimicStructureChanged ()
 Called in order to mimic the entity structure changing, even if it has not
 
int32 MutateAll (const FEntityComponentFilter &Filter, const IMovieSceneEntityMutation &Mutation)
 Efficiently mutate all entities that match a filter. 更多...
 
void OverwriteEntityWithDuplicate (FMovieSceneEntityID &InOutEntity, FMovieSceneEntityID InEntityToDuplicate)
 Duplicate an entity over the top of an existing entity ID 更多...
 
template<typename T >
TComponentPtr< const T > ReadComponent (FMovieSceneEntityID Entity, TComponentTypeID< T > ComponentTypeID) const
 Attempt to read a component from an entity. 更多...
 
template<typename T >
T ReadComponentChecked (FMovieSceneEntityID Entity, TComponentTypeID< T > ComponentTypeID) const
 Read a component value from an entity that is known to exist. 更多...
 
void RemoveComponent (FMovieSceneEntityID EntityID, FComponentTypeID ComponentTypeID)
 Remove the specified component type from an entity if it exists. 更多...
 
void RemoveComponents (FMovieSceneEntityID EntityID, const FComponentMask &ComponentsToRemove)
 Remove the specified components from an entity, if they exist. 更多...
 
void ReplaceEntityID (FMovieSceneEntityID &InOutEntity, FMovieSceneEntityID EntityToDiscard)
 Replace an entity ID with the components from another, discarding the provided entity ID in the process 更多...
 
void SetDebugName (FString &&InNewDebugName)
 Set a debug name for this entity manager
 
void TouchEntity (FMovieSceneEntityID EntityID)
 Touch the specified entity, cause the allocation and component serial numbers to be incremented. 更多...
 
template<typename T >
TComponentPtr< T > WriteComponent (FMovieSceneEntityID Entity, TComponentTypeID< T > ComponentTypeID)
 Attempt to write to an entity's component. 更多...
 
template<typename T , typename ValueType >
void WriteComponentChecked (FMovieSceneEntityID Entity, TComponentTypeID< T > ComponentTypeID, ValueType &&Value) const
 Write a component value that is known to exist to an entity. 更多...
 
- Public 成员函数 继承自 FUObjectArray::FUObjectDeleteListener
virtual void NotifyUObjectDeleted (const class UObjectBase *Object, int32 Index)=0
 Provides notification that a UObjectBase has been removed from the uobject array 更多...
 
virtual void OnUObjectArrayShutdown ()=0
 Called when UObject Array is being shut down, this is where all listeners should be removed from it
 

静态 Public 成员函数

static IComponentTypeHandler * FindComponentTypeHandler (const FGuid &ComponentGuid)
 Find a component type hander from its registered GUID
 

详细描述

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.

成员函数说明

◆ AccumulateMask()

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

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

参数
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

参数
ParentIDThe ID of the parent
ChildIDThe ID of the child

◆ AddComponent() [1/2]

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

Add the specified component type to an entity.

The component value will be default-initialized.

参数
EntityIDThe ID of the entity to add the component to
ComponentTypeIDThe ID of the component type to add to the entity

◆ AddComponent() [2/2]

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

参数
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()

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.

参数
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)

◆ 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

注解
May allocate fewer than the desired number due to allocation capacity constraints. As such, subsequent calls may be required.
参数
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.
返回
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

返回
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

参数
EntityComponentMaskDefines the components that should exist on the allocated components. Set bits denote allocated components and tags.
返回
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

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

◆ 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.

参数
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

◆ Contains()

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

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

参数
InFilterThe filter to match allocations against.
返回
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

注解
: 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.
参数
ComponentTypeIDsThe types of the components that are being tested for
返回
true if each of the specified components exist anywhere in this manager, false otherwise

◆ ContainsAnyComponent()

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

参数
ComponentTypeIDsThe types of the component that are being tested for
返回
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

参数
ComponentTypeIDThe type of the component that is being tested for
返回
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.

参数
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.

参数
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()

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

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

注解
Does not consider per-allocation overhead such as header sizes and other per-allocation meta-data
参数
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

参数
InInitializerThe initializer to insert
返回
An index into the array of initializers that should be used for removal

◆ DuplicateEntity()

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

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

参数
InOtherThe ID of the entity to duplicate
返回
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

参数
InFilterThe filter to match allocations against.
返回
True if the entity manager contains any allocations that match the filter, false otherwise

◆ FilterComponents()

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

Remove all but the specified components from an entity.

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

◆ FreeEntities() [1/2]

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

Free all entities that match the specified filter

参数
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)
返回
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

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

◆ FreeEntity()

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

Free an entity and relinquish its entity ID

参数
EntityIDA valid entity ID to free
返回
The number of entities released

◆ 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

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

◆ GetEntity()

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

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

返回
A structure that points to the allocated entity.

◆ GetEntityHandle()

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

Retrieve a handle to an entity

返回
A handle that points to the allocated entity.

◆ GetEntityType()

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

Retrieve the type mask for this component

参数
InEntityThe ID of the entity
返回
The type mask for this entity, or an empty mask if it has no components

◆ GetImmediateChildren()

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

Retrieve the immediate children of the specified entity

注解
: the array will not be emptied by this function - that is the responsibility of the callee, if desired.
参数
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.

◆ HasComponent()

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

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

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

◆ IncrementSystemSerial()

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

Increment the current serial number for systems observing this manager.

Should be called after any system is run

◆ IsAllocated()

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

Check whether an entity is allocated.

注解
: 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
返回
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

返回
true if the entity ID is allocated, false otherwise

◆ Iterate()

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

Iterate through all the allocations that match the specified component filter

参数
InFilter(required, non-null) The filter to match allocations against. Filter is copied into the iterator.
返回
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

参数
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

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

◆ MutateAll()

int32 UE::MovieScene::FEntityManager::MutateAll ( const FEntityComponentFilter &  Filter,
const IMovieSceneEntityMutation &  Mutation 
)

Efficiently mutate all entities that match a filter.

Mutations can add or remove components from batches of entity data.

参数
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
返回
The number of entities that were mutated, or 0 if none were matched

◆ OverwriteEntityWithDuplicate()

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

Duplicate an entity over the top of an existing entity ID

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

◆ ReadComponent()

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

Attempt to read a component from an entity.

注解
this is a general purpose convenience utility which should not be used for high-performance runtime code. See FEntityTaskBuilder.
参数
EntityThe ID of the entity to read from
ComponentTypeIDThe component that is to be read
返回
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.

注解
this is a general purpose convenience utility which should not be used for high-performance runtime code. See FEntityTaskBuilder.
参数
EntityThe ID of the entity to read from
ComponentTypeIDThe component that is to be read
返回
The component value

◆ RemoveComponent()

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

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

参数
EntityIDThe ID of the entity to remove the component from
ComponentTypeIDThe ID of the component type to remove from the entity

◆ RemoveComponents()

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

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

参数
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)

◆ 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

参数
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.

◆ 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.

注解
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
参数
EntityIDThe ID of the entity to touch.

◆ WriteComponent()

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

Attempt to write to an entity's component.

注解
this is a general purpose convenience utility which should not be used for high-performance runtime code. See FEntityTaskBuilder.
参数
EntityThe ID of the entity to read from
ComponentTypeIDThe component that is to be read
返回
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 
) const
inline

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

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

该类的文档由以下文件生成: