diff --git a/Source/Engine/Animations/Animations.cpp b/Source/Engine/Animations/Animations.cpp index efff52998..033659948 100644 --- a/Source/Engine/Animations/Animations.cpp +++ b/Source/Engine/Animations/Animations.cpp @@ -95,6 +95,12 @@ void AnimationsSystem::Execute(TaskGraph* graph) Time = tickData.Time.GetTotalSeconds(); UnscaledTime = tickData.UnscaledTime.GetTotalSeconds(); +#if USE_EDITOR + // 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 + if (Animations::DebugFlow.IsBinded()) + Animations::DebugFlow(nullptr, nullptr, 0, 0); +#endif + // Schedule work to update all animated models in async Function job; job.Bind(this);