Created
January 13, 2017 15:25
-
-
Save tsubaki/d688cb5cdda720f24f892196db966dc3 to your computer and use it in GitHub Desktop.
トリガーをリセットするStatemacihneBehaviour
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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