Ejemplo n.º 1
0
 protected override void OnGUIContent()
 {
     if (Data == null)
     {
         var tt = (track as XGroupTrack);
         Data = (GroupTrackData)tt?.data;
     }
     base.OnGUIContent();
     area       = RenderRect;
     area.x     = RenderHead.x;
     area.width = SeqenceWindow.inst.winArea.width;
     EditorGUI.DrawRect(area, trackColor);
     GroupMenu();
 }
Ejemplo n.º 2
0
        private static TrackData CreateTrackData(Type type)
        {
            TrackData data = null;

            if (type == typeof(XAnimationTrack))
            {
                data      = new AnimationTrackData();
                data.type = AssetType.Animation;
            }
            else if (type == typeof(XPostprocessTrack))
            {
                data      = new TrackData();
                data.type = AssetType.PostProcess;
            }
            else if (type == typeof(XBoneFxTrack))
            {
                data      = new TrackData();
                data.type = AssetType.BoneFx;
            }
            else if (type == typeof(XSceneFxTrack))
            {
                data      = new TrackData();
                data.type = AssetType.SceneFx;
            }
            else if (type == typeof(XTransformTrack))
            {
                data      = new TransformTrackData();
                data.type = AssetType.Transform;
            }
            else if (type == typeof(XLogicTrack))
            {
                data      = new TrackData();
                data.type = AssetType.LogicValue;
            }
            else if (type == typeof(XGroupTrack))
            {
                data      = new GroupTrackData();
                data.type = AssetType.Group;
            }
            else
            {
                throw new Exception("not implement trackdata for default");
            }
            return(data);
        }