MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Execute

Method Execute

Source/Engine/Animations/Animations.cpp:120–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120void AnimationsSystem::Execute(TaskGraph* graph)
121{
122 if (AnimationManagerInstance.UpdateList.Count() == 0)
123 return;
124 Active = true;
125
126 // Ensure no animation assets can be reloaded/modified during async update
127 Animations::SystemLocker.ReadLock();
128
129 // Setup data for async update
130 const auto& tickData = Time::Update;
131 DeltaTime = tickData.DeltaTime.GetTotalSeconds();
132 UnscaledDeltaTime = tickData.UnscaledDeltaTime.GetTotalSeconds();
133 Time = tickData.Time.GetTotalSeconds();
134 UnscaledTime = tickData.UnscaledTime.GetTotalSeconds();
135
136#if USE_EDITOR
137 // If debug flow is registered, then warm it up (eg. static cached method inside DebugFlow_ManagedWrapper) so it doesn't crash on highly multi-threaded code
138 if (Animations::DebugFlow.IsBinded())
139 Animations::DebugFlow(Animations::DebugFlowInfo());
140#endif
141
142 // Schedule work to update all animated models in async
143 Function<void(int32)> job;
144 job.Bind<AnimationsSystem, &AnimationsSystem::Job>(this);
145 graph->DispatchJob(job, AnimationManagerInstance.UpdateList.Count());
146}
147
148void AnimationsSystem::PostExecute(TaskGraph* graph)
149{

Callers

nothing calls this directly

Calls 4

DebugFlowInfoClass · 0.85
DispatchJobMethod · 0.80
CountMethod · 0.45
IsBindedMethod · 0.45

Tested by

no test coverage detected