public RTTrackViz(RedTween.Track track, GameObject parent, int count, float setLength)
        {
            Track      = track;
            Panel      = new GameObject("Track", typeof(RectTransform));
            mTrackSize = (Track.Length / setLength) * mMaxTrackSize;
            RedTweenVisualizer.SetRect(Panel, parent, 2, -12 * count - 12, mTrackSize, 10, 0, 1, 0, 1);
            RedTweenVisualizer.SetImage(Panel, Color.white, 0.25f);

            float lastPercent = 0;

            for (int i = 0; i < Track.Clips.Count; i++)
            {
                RTClipViz clip = new RTClipViz(Track.Clips[i], Panel, Track.Length, lastPercent);
                Clips.Add(clip);
                lastPercent = clip.EndPercent;
            }

            GameObject markerObj = new GameObject("Track", typeof(RectTransform));

            RedTweenVisualizer.SetRect(markerObj, Panel, 0, 0, 1, 12, 0, 0.5f, 0, 0.5f);
            RedTweenVisualizer.SetImage(markerObj, Color.white, 1f);
            Marker = markerObj.GetComponent <RectTransform>();

            AddText();
        }
        public RTSetViz(RedTween.Set set, GameObject parent, float height)
        {
            Set   = set;
            Panel = new GameObject("Set " + Set.Tag, typeof(RectTransform));
            Rect  = RedTweenVisualizer.SetRect(Panel, parent, 0, height, 600, Set.TrackCount * 12 + 12, 0, 0, 0, 0);
            RedTweenVisualizer.SetImage(Panel, Color.black, 0.95f);
            int i = 0;

            foreach (RedTween.Track track in set.Tracks.Values)
            {
                Tracks.Add(new RTTrackViz(track, Panel, i, Set.Length));
                i++;
            }

            AddText();
        }
        public RTClipViz(RedTweenClip clip, GameObject parent, float trackLength, float lastPercent)
        {
            Clip         = clip;
            Panel        = new GameObject("Clip", typeof(RectTransform));
            ThisPercent  = (Clip.Length / trackLength);
            StartPercent = lastPercent;
            EndPercent   = StartPercent + ThisPercent;
            RedTweenVisualizer.SetRectFull(Panel, parent, 0, 0, 0, 8, StartPercent, 0.5f, EndPercent, 0.5f, 0, 0.5f, Vector3.one);

            RectTransform rt = Panel.GetComponent <RectTransform>();

            rt.offsetMin = new Vector2(1, rt.offsetMin.y);
            rt.offsetMax = new Vector2(-1, rt.offsetMax.y);

            Color c = GetClipColor(Clip.TweenType);

            RedTweenVisualizer.SetImage(Panel, c, 0.5f);
        }