av3-animator-as-code
av3-animator-as-code copied to clipboard
Disable undo in autogenerated state machines
Unity's undo processing gets extremely slow when dealing with large numbers of newly created objects. I suspect there may be some O(n^2) scaling going on there. Regardless, this change disables undo for the AAC-handled state machines to avoid this issue.
This seems consistent with what I observed in a non-backported change from CGE https://github.com/hai-vr/combo-gesture-expressions-av3/commit/5bc9bfd6822ccde8eeda910e7e1882db3b0b7c96
Ref #24
This also needs to add in the undo change for AacFlCondition as those generate undo states aswell
A similar fix was added to AAC V1: https://github.com/hai-vr/av3-animator-as-code/blob/wip-v1/Packages/dev.hai-vr.animator-as-code.v1/V1/Editor/AacFlStates.cs#L189C38-L189C44