diff --git a/Source/Engine/Animations/Animations.cpp b/Source/Engine/Animations/Animations.cpp index 6959211b9..a9e727d9d 100644 --- a/Source/Engine/Animations/Animations.cpp +++ b/Source/Engine/Animations/Animations.cpp @@ -56,16 +56,17 @@ void AnimationsSystem::Job(int32 index) auto animatedModel = UpdateList[index]; auto skinnedModel = animatedModel->SkinnedModel.Get(); auto graph = animatedModel->AnimationGraph.Get(); -#if COMPILE_WITH_PROFILER && TRACY_ENABLE - const StringView graphName(graph->GetPath()); - ZoneName(*graphName, graphName.Length()); -#endif if (graph && graph->IsLoaded() && graph->Graph.CanUseWithSkeleton(skinnedModel) #if USE_EDITOR && graph->Graph.Parameters.Count() == animatedModel->GraphInstance.Parameters.Count() // It may happen in editor so just add safe check to prevent any crashes #endif ) { +#if COMPILE_WITH_PROFILER && TRACY_ENABLE + const StringView graphName(graph->GetPath()); + ZoneName(*graphName, graphName.Length()); +#endif + // Prepare skinning data animatedModel->SetupSkinningData();