Skip to content

Commit

Permalink
Fix the rare case where transition.isExit is true but there are desti…
Browse files Browse the repository at this point in the history
…nations set, apparently unity handles them as not exit states
  • Loading branch information
Cibbi committed Jul 17, 2022
1 parent 2a03687 commit ead2b4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Editor/AnimatorCloner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ private static void CloneTransitions(AnimatorStateMachine old, AnimatorStateMach
foreach (var transition in oldStates[i].transitions)
{
AnimatorStateTransition newTransition = null;
if (transition.isExit)
if (transition.isExit && transition.destinationState == null && transition.destinationStateMachine == null)
{
newTransition = newStates[i].AddExitTransition();
}
Expand Down

0 comments on commit ead2b4e

Please sign in to comment.