-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable undo in autogenerated state machines #31
Conversation
This seems consistent with what I observed in a non-backported change from CGE Ref #24 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just needs a slight change to a type lookup, other than that this seems to work well and improves the build speed of the animator when there is alot of additions being made
@@ -112,7 +113,11 @@ public AacFlIntParameterGroup IntParameters(params AacFlIntParameter[] parameter | |||
|
|||
internal class AacStateMachine | |||
{ | |||
private static readonly PropertyInfo PropPushUndo = typeof(AnimatorState).GetProperty("pushUndo", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AnimatorState
needs to be changed to AnimatorStateMachine
, or else there will be an error due to types not matching
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: |
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.