CurveControlTrack.cs 779 B

123456789101112131415161718192021222324252627
  1. using UnityEngine;
  2. using UnityEngine.Playables;
  3. using UnityEngine.Timeline;
  4. using System.Collections.Generic;
  5. [TrackColor(0.9454092f, 0.9779412f, 0.3883002f)]
  6. [TrackClipType(typeof(CurveControlClip))]
  7. [TrackBindingType(typeof(Renderer))]
  8. public class CurveControlTrack : TrackAsset
  9. {
  10. public override Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount)
  11. {
  12. foreach (var clip in GetClips())
  13. {
  14. var mcb = clip.asset as CurveControlClip;
  15. mcb.clipPassthrough = clip;
  16. }
  17. return ScriptPlayable<CurveControlMixerBehaviour>.Create(graph, inputCount);
  18. }
  19. public override void GatherProperties(PlayableDirector director, IPropertyCollector driver)
  20. {
  21. }
  22. }