mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-04 13:45:04 +08:00
chore: add some additional profiling declarations (#785)
This commit is contained in:
parent
9516a5eafa
commit
65797aa012
@ -12,6 +12,7 @@ using nadena.dev.ndmf;
|
|||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEditor.Animations;
|
using UnityEditor.Animations;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.Profiling;
|
||||||
using VRC.SDK3.Avatars.Components;
|
using VRC.SDK3.Avatars.Components;
|
||||||
using VRC.SDK3.Avatars.ScriptableObjects;
|
using VRC.SDK3.Avatars.ScriptableObjects;
|
||||||
using VRC.SDK3.Dynamics.Contact.Components;
|
using VRC.SDK3.Dynamics.Contact.Components;
|
||||||
@ -479,7 +480,9 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
// Deep clone the animator
|
// Deep clone the animator
|
||||||
if (!_context.PluginBuildContext.IsTemporaryAsset(controller))
|
if (!_context.PluginBuildContext.IsTemporaryAsset(controller))
|
||||||
{
|
{
|
||||||
|
Profiler.BeginSample("DeepCloneAnimator");
|
||||||
controller = _context.DeepCloneAnimator(controller);
|
controller = _context.DeepCloneAnimator(controller);
|
||||||
|
Profiler.EndSample();
|
||||||
}
|
}
|
||||||
|
|
||||||
var parameters = controller.parameters;
|
var parameters = controller.parameters;
|
||||||
@ -501,6 +504,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Profiler.BeginSample("Walk animator graph");
|
||||||
while (queue.Count > 0)
|
while (queue.Count > 0)
|
||||||
{
|
{
|
||||||
var sm = queue.Dequeue();
|
var sm = queue.Dequeue();
|
||||||
@ -541,6 +545,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
ProcessState(st.state, remaps);
|
ProcessState(st.state, remaps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Profiler.EndSample();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProcessState(AnimatorState state, ImmutableDictionary<string, string> remaps)
|
private void ProcessState(AnimatorState state, ImmutableDictionary<string, string> remaps)
|
||||||
|
Loading…
Reference in New Issue
Block a user