From 65797aa0125369af007c425b21814ae93bad296e Mon Sep 17 00:00:00 2001 From: bd_ Date: Sat, 16 Mar 2024 17:37:03 +0900 Subject: [PATCH] chore: add some additional profiling declarations (#785) --- Editor/RenameParametersHook.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Editor/RenameParametersHook.cs b/Editor/RenameParametersHook.cs index 4011a7af..a9c03ba2 100644 --- a/Editor/RenameParametersHook.cs +++ b/Editor/RenameParametersHook.cs @@ -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 remaps)