ITimeControl.cs 1007 B

123456789101112131415161718192021222324252627
  1. namespace UnityEngine.Timeline
  2. {
  3. /// <summary>
  4. /// Interface that can be implemented by MonoBehaviours indicating that they receive time-related control calls from a PlayableGraph.
  5. /// </summary>
  6. /// <remarks>
  7. /// Implementing this interface on MonoBehaviours attached to GameObjects under control by control-tracks will cause them to be notified when associated Timeline clips are active.
  8. /// </remarks>
  9. public interface ITimeControl
  10. {
  11. /// <summary>
  12. /// Called each frame the Timeline clip is active.
  13. /// </summary>
  14. /// <param name="time">The local time of the associated Timeline clip.</param>
  15. void SetTime(double time);
  16. /// <summary>
  17. /// Called when the associated Timeline clip becomes active.
  18. /// </summary>
  19. void OnControlTimeStart();
  20. /// <summary>
  21. /// Called when the associated Timeline clip becomes deactivated.
  22. /// </summary>
  23. void OnControlTimeStop();
  24. }
  25. }