chore: add some additional profiling declarations (#785)

This commit is contained in:
bd_ 2024-03-16 17:37:03 +09:00 committed by GitHub
parent 9516a5eafa
commit 65797aa012
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,6 +12,7 @@ using nadena.dev.ndmf;
using UnityEditor;
using UnityEditor.Animations;
using UnityEngine;
using UnityEngine.Profiling;
using VRC.SDK3.Avatars.Components;
using VRC.SDK3.Avatars.ScriptableObjects;
using VRC.SDK3.Dynamics.Contact.Components;
@ -479,7 +480,9 @@ namespace nadena.dev.modular_avatar.core.editor
// Deep clone the animator
if (!_context.PluginBuildContext.IsTemporaryAsset(controller))
{
Profiler.BeginSample("DeepCloneAnimator");
controller = _context.DeepCloneAnimator(controller);
Profiler.EndSample();
}
var parameters = controller.parameters;
@ -501,6 +504,7 @@ namespace nadena.dev.modular_avatar.core.editor
}
}
Profiler.BeginSample("Walk animator graph");
while (queue.Count > 0)
{
var sm = queue.Dequeue();
@ -541,6 +545,7 @@ namespace nadena.dev.modular_avatar.core.editor
ProcessState(st.state, remaps);
}
}
Profiler.EndSample();
}
private void ProcessState(AnimatorState state, ImmutableDictionary<string, string> remaps)