When checked in the Profiler, the Self ms in
UnityEditor.Sequences.SequenceIndexer.RecomputeSequencesValidity
is a very long time because the operation is very heavy, except during timeline playback on the Editor.
This does not occur in the following environments.
Unity 2021.3.12f1
Sequences 1.1.0
Thank you in advance for your help with the above.
Hi there! Thanks for the feedback. We weren’t aware of this issue and have now logged it on our end so we’ll take a look.
As a side note, it is normal that this issue wouldn’t occur in Sequences 1.1.0. The RecomputeSequencesValidity mechanism was only added in 2.0.1 when we moved from IMGUI to UIToolkit.
if (Application.isPlaying)
return false;
// Get the current time.
float currentTime = Time.realtimeSinceStartup; // BRYAN BUG FIX
// Check if less than a second has passed since the last call.
if (currentTime - lastValidityCheckTime < 1f)
{
// If so, exit early.
return false;
}
// Update the timestamp of the last call.
lastValidityCheckTime = currentTime;
I added a timer to limit the amount of call to once per second