概要
using UnityEditor;
using UnityEditor.Animations;
public static class AnimatorStateTransitionContext
{
[MenuItem( "CONTEXT/AnimatorStateTransition/Reset Simple" )]
private static void ResetSimple( MenuCommand command )
{
var transition = command.context as AnimatorStateTransition;
Undo.RecordObject( transition, "Reset Simple" );
transition.hasExitTime = false;
transition.exitTime = 0;
transition.hasFixedDuration = false;
transition.duration = 0;
transition.offset = 0;
transition.canTransitionToSelf = false;
}
}