av3-animator-as-code icon indicating copy to clipboard operation
av3-animator-as-code copied to clipboard

Disable undo in autogenerated state machines

Open bdunderscore opened this issue 2 years ago • 1 comments

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.

bdunderscore avatar Sep 11 '22 01:09 bdunderscore

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

hai-vr avatar Sep 11 '22 10:09 hai-vr

This also needs to add in the undo change for AacFlCondition as those generate undo states aswell

Happyrobot33 avatar Dec 15 '22 18:12 Happyrobot33

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

hai-vr avatar Oct 01 '23 18:10 hai-vr