Defines the accessors for each desired component of an entity task 更多...
#include <MovieSceneEntitySystemTask.h>
继承自 UE::MovieScene::TEntityTaskComponentsImpl<... > .
Public 成员函数 | |
| TFilteredEntityTask< T... > | CombineFilter (const FEntityComponentFilter &InFilter) |
| Combine this task's filter with the specified filter | |
| template<typename TaskImpl , typename... TaskConstructionArgs> | |
| FGraphEventRef | Dispatch_PerAllocation (FEntityManager *EntityManager, const FSystemTaskPrerequisites &Prerequisites, FSystemSubsequentTasks *Subsequents, TaskConstructionArgs &&... InArgs) const |
| Dispatch a task for every allocation that matches the filters and component types. 更多... | |
| template<typename TaskImpl , typename... TaskConstructionArgs> | |
| FGraphEventRef | Dispatch_PerEntity (FEntityManager *EntityManager, const FSystemTaskPrerequisites &Prerequisites, FSystemSubsequentTasks *Subsequents, TaskConstructionArgs &&... InArgs) const |
| Dispatch a task for every entity that matches the filters and component types. 更多... | |
| TFilteredEntityTask< T... > | FilterAll (const FComponentMask &InComponentMask) |
| Constrain this task to only run for entities that have all the specified components or tags | |
| TFilteredEntityTask< T... > | FilterAll (std::initializer_list< FComponentTypeID > InComponentTypes) |
| Constrain this task to only run for entities that have all the specified components or tags | |
| TFilteredEntityTask< T... > | FilterAny (const FComponentMask &InComponentMask) |
| Constrain this task to only run for entities that have at least one of the specified components or tags | |
| TFilteredEntityTask< T... > | FilterAny (std::initializer_list< FComponentTypeID > InComponentTypes) |
| Constrain this task to only run for entities that have at least one of the specified components or tags | |
| TFilteredEntityTask< T... > | FilterNone (const FComponentMask &InComponentMask) |
| Constrain this task to only run for entities that have none the specified components or tags | |
| TFilteredEntityTask< T... > | FilterNone (std::initializer_list< FComponentTypeID > InComponentTypes) |
| Constrain this task to only run for entities that have none the specified components or tags | |
| TFilteredEntityTask< T... > | FilterOut (const FComponentMask &InComponentMask) |
| Constrain this task to only run for entities that do not have the specific combination of components or tags | |
| TFilteredEntityTask< T... > | FilterOut (std::initializer_list< FComponentTypeID > InComponentTypes) |
| Constrain this task to only run for entities that do not have the specific combination of components or tags | |
| TEntityTaskComponents< T... > & | SetCurrentThread (ENamedThreads::Type InCurrentThread) |
| Assign the current thread for task dispatch to ensure that it is issued on the correct thread. 更多... | |
| TEntityTaskComponents< T... > & | SetDesiredThread (ENamedThreads::Type InDesiredThread) |
| Assign a desired thread for this task to run on | |
| TEntityTaskComponents< T... > & | SetStat (TStatId InStatId) |
| Assign a stat ID for this task | |
Public 属性 | |
| bool | bBreakOnRun |
| Useful for debugging to break the debugger when this task is run | |
| ENamedThreads::Type | CurrentThread |
| The current thread that is being used to dispatch from. 更多... | |
| ENamedThreads::Type | DesiredThread |
| The thread that this task wants to run on | |
| TStatId | StatId |
| A stat ID for the task | |
Defines the accessors for each desired component of an entity task
|
inline |
Dispatch a task for every allocation that matches the filters and component types.
Must be explicitly instantiated with the task type to dispatch. Construction arguments are deduced. Tasks must implement a ForEachAllocation function that matches this task's component accessor types.
For example: struct FForEachAllocation { void ForEachAllocation(FEntityAllocation* InAllocation, const TFilteredEntityTask< FReadEntityIDs, TRead<FMovieSceneFloatChannel> >& InputTask); };
TComponentTypeID<FMovieSceneFloatChannel> FloatChannelComponent = ...;
FGraphEventRef Task = FEntityTaskBuilder() .ReadEntityIDs() .Read(FloatChannelComponent) .SetStat(GET_STATID(MyStatName)) .SetDesiredThread(ENamedThreads::AnyThread) .Dispatch_PerAllocation<FForEachAllocation>(EntityManager, Prerequisites);
| EntityManager | The entity manager to run the task on. All component types must relate to this entity manager. |
| Prerequisites | Prerequisite tasks that must run before this one |
| Subsequents | (Optional) Subsequent task tracking that this task should be added to for each writable component type |
| InArgs | Optional arguments that are forwarded to the constructor of TaskImpl |
|
inline |
Dispatch a task for every entity that matches the filters and component types.
Must be explicitly instantiated with the task type to dispatch. Construction arguments are deduced. Tasks must implement a ForEachEntity function that matches this task's component accessor types.
For example: struct FForEachEntity { void ForEachEntity(FMovieSceneEntityID InEntityID, const FMovieSceneFloatChannel& Channel); };
TComponentTypeID<FMovieSceneFloatChannel> FloatChannelComponent = ...;
FGraphEventRef Task = FEntityTaskBuilder() .ReadEntityIDs() .Read(FloatChannelComponent) .SetStat(GET_STATID(MyStatName)) .SetDesiredThread(ENamedThreads::AnyThread) .Dispatch_PerEntity<FForEachEntity>(EntityManager, nullptr);
| EntityManager | The entity manager to run the task on. All component types must relate to this entity manager. |
| Prerequisites | Prerequisite tasks that must run before this one, or nullptr if there are no prerequisites |
| Subsequents | (Optional) Subsequent task tracking that this task should be added to for each writable component type |
| InArgs | Optional arguments that are forwarded to the constructor of TaskImpl |
|
inline |
Assign the current thread for task dispatch to ensure that it is issued on the correct thread.
This should only be required for tasks dispatched outside of the main linker execution, or tasks dispatched for the global entity manager
| ENamedThreads::Type UE::MovieScene::TEntityTaskComponents< T >::CurrentThread |
The current thread that is being used to dispatch from.
Only necessary when EntityManager->GetDispatchThread is not available (ie when tasks are being run outside of system linkers)