Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Created January 13, 2017 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsubaki/d688cb5cdda720f24f892196db966dc3 to your computer and use it in GitHub Desktop.
Save tsubaki/d688cb5cdda720f24f892196db966dc3 to your computer and use it in GitHub Desktop.
トリガーをリセットするStatemacihneBehaviour
using UnityEngine;
public class ResetTrigger : StateMachineBehaviour {
[SerializeField]
string triggerName;
override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) {
animator.ResetTrigger(triggerName);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment