Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Created May 22, 2017 12:13
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/8fa3d9b6d2a853735e3bf7aafb031345 to your computer and use it in GitHub Desktop.
Save tsubaki/8fa3d9b6d2a853735e3bf7aafb031345 to your computer and use it in GitHub Desktop.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[SharedBetweenAnimators]
public class Sample : StateMachineBehaviour {
[SerializeField] string tag;
private int entryCount = 0;
override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
{
entryCount++;
Debug.LogFormat ("entry : {0} animator:{1} state:{2}", entryCount, animator.name, tag);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment