private void Start()
 {
     animator.AddClipStartCallback(layerIndex, clipName, () =>
     {
         Debug.LogFormat("Clip \"{0}\": started", clipName);
     });
     animator.AddClipEndCallback(layerIndex, clipName, () =>
     {
         Debug.LogFormat("Clip \"{0}\": ended", clipName);
     });
     animator.AddClipCallback(layerIndex, clipName, ExampleTimelinePosition, () =>
     {
         Debug.LogFormat("Clip \"{0}\": callback at {1} seconds after start", clipName, ExampleTimelinePosition);
     });
 }
Exemple #2
0
 private void AddStartCallback()
 {
     animator.AddClipStartCallback(layerIndex, clipName, HandleClipStarted);
 }