MarkerTrack.cs 746 B

12345678910111213141516171819202122232425262728
  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. [ExcludeFromPreset]
  14. public class MarkerTrack : TrackAsset
  15. {
  16. /// <inheritdoc/>
  17. public override IEnumerable<PlayableBinding> outputs
  18. {
  19. get
  20. {
  21. return this == timelineAsset.markerTrack ?
  22. new List<PlayableBinding> {ScriptPlayableBinding.Create(name, null, typeof(GameObject))} :
  23. base.outputs;
  24. }
  25. }
  26. }
  27. }