Module |
|
Header |
/Engine/Source/Runtime/MovieScene/Public/EntitySystem/MovieSceneEntitySystemTask.h |
Include |
#include "EntitySystem/MovieSceneEntitySystemTask.h" |
template<typename TaskImpl, typename... TaskConstructionArgs>
FGraphEventRef Dispatch_PerAllocation
(
FEntityManager * EntityManager,
const FSystemTaskPrerequisites & Prerequisites,
FSystemSubsequentTasks * Subsequents,
TaskConstructionArgs &&... InArgs
) const
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
FGraphEventRef Task = FEntityTaskBuilder() .ReadEntityIDs() .Read(FloatChannelComponent) .SetStat(GET_STATID(MyStatName)) .SetDesiredThread(ENamedThreads::AnyThread) .Dispatch_PerEntity
A pointer to the graph event for the task, or nullptr if this task is not valid (ie contains invalid component types that would be necessary for the task to run), or threading is disabled
Parameter |
Description |
---|---|
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 |