using UnityEngine; using UnityEngine.Playables; using UnityEngine.Timeline; using System.Collections.Generic; [TrackColor(0.9454092f, 0.9779412f, 0.3883002f)] [TrackClipType(typeof(MatControlClip))] [TrackBindingType(typeof(Renderer))] public class MatControlTrack : TrackAsset { public override Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount) { foreach (var clip in GetClips()) { var mcb = clip.asset as MatControlClip; mcb.clipPassthrough = clip; } return ScriptPlayable.Create(graph, inputCount); } public override void GatherProperties(PlayableDirector director, IPropertyCollector driver) { /* #if UNITY_EDITOR Material trackBinding = director.GetGenericBinding(this) as Material; if (trackBinding == null) return; driver.AddFromName(trackBinding, "m_Color"); driver.AddFromName(trackBinding.gameObject, "m_Intensity"); driver.AddFromName(trackBinding.gameObject, "m_Range"); driver.AddFromName(trackBinding.gameObject, "m_BounceIntensity"); #endif base.GatherProperties(director, driver); */ } }