Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

bdunderscore
Copy link
Contributor

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.

@hai-vr
Copy link
Owner

hai-vr commented Sep 11, 2022

This seems consistent with what I observed in a non-backported change from CGE
hai-vr/combo-gesture-expressions-av3@5bc9bfd

Ref #24

Copy link

@Happyrobot33 Happyrobot33 left a 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",

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

@Happyrobot33
Copy link

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

suzuryg added a commit to suzuryg/av3-animator-as-code that referenced this pull request Feb 18, 2023
Happyrobot33 added a commit to Happyrobot33/av3-animator-as-code that referenced this pull request May 16, 2023
@hai-vr hai-vr added this to the V1.0.9910 milestone Sep 30, 2023
@hai-vr
Copy link
Owner

hai-vr commented Oct 1, 2023

@hai-vr hai-vr closed this Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants