MarkerTrack.cs 722 B

123456789101112131415161718192021222324252627
  1. using System;
  2. using System.Collections.Generic;
  3. using UnityEngine.Playables;
  4. namespace UnityEngine.Timeline
  5. {
  6. /// <inheritdoc />
  7. /// <summary>
  8. /// Use this track to add Markers bound to a GameObject.
  9. /// </summary>
  10. [Serializable]
  11. [TrackBindingType(typeof(GameObject))]
  12. [HideInMenu]
  13. public class MarkerTrack : TrackAsset
  14. {
  15. /// <inheritdoc/>
  16. public override IEnumerable<PlayableBinding> outputs
  17. {
  18. get
  19. {
  20. return this == timelineAsset.markerTrack ?
  21. new List<PlayableBinding> {ScriptPlayableBinding.Create(name, null, typeof(GameObject))} :
  22. base.outputs;
  23. }
  24. }
  25. }
  26. }