private void Start()
 {
     exampleAnimation.AddClipStartCallback(clipName, () =>
     {
         Debug.LogFormat("Clip \"{0}\": started", clipName);
     });
     exampleAnimation.AddClipEndCallback(clipName, () =>
     {
         Debug.LogFormat("Clip \"{0}\": ended", clipName);
     });
     exampleAnimation.AddClipCallback(clipName, ExampleTimelinePosition, () =>
     {
         Debug.LogFormat("Clip \"{0}\": callback at {1} seconds after start", clipName, ExampleTimelinePosition);
     });
     exampleAnimation.Play(clipName);
 }
Example #2
0
 private void AddEndCallback()
 {
     exampleAnimation.AddClipEndCallback(clipName, HandleClipEnded);
 }