/// <summary> /// Update and Draw the inspector /// </summary> public override void OnInspectorGUI() { curveTrack.Update(); foreach (CinemaActorClipCurve clip in (target as CurveTrack).TimelineItems) { EditorGUILayout.ObjectField(clip.name, clip, typeof(CinemaActorClipCurve), true); } if (GUILayout.Button(addClip)) { Undo.RegisterCreatedObjectUndo(CutsceneItemFactory.CreateActorClipCurve((target as CurveTrack)).gameObject, "Create Curve Clip"); } curveTrack.ApplyModifiedProperties(); }
/// <summary> /// Update and Draw the inspector /// </summary> public override void OnInspectorGUI() { curveTrack.Update(); TimelineItem[] items = (target as CurveTrack).TimelineItems; for (int i = 0; i < items.Length; i++) { CinemaActorClipCurve clip = items[i] as CinemaActorClipCurve; EditorGUILayout.ObjectField(clip.name, clip, typeof(CinemaActorClipCurve), true); } if (GUILayout.Button(addClip)) { Undo.RegisterCreatedObjectUndo(CutsceneItemFactory.CreateActorClipCurve((target as CurveTrack)).gameObject, "Create Curve Clip"); } curveTrack.ApplyModifiedProperties(); }
/// <summary> /// Update and Draw the inspector /// </summary> public override void OnInspectorGUI() { curveTrack.Update(); { var __array1 = (target as CurveTrack).TimelineItems; var __arrayLength1 = __array1.Length; for (int __i1 = 0; __i1 < __arrayLength1; ++__i1) { var clip = (CinemaActorClipCurve)__array1[__i1]; { EditorGUILayout.ObjectField(clip.name, clip, typeof(CinemaActorClipCurve), true); } } } if (GUILayout.Button(addClip)) { Undo.RegisterCreatedObjectUndo(CutsceneItemFactory.CreateActorClipCurve((target as CurveTrack)).gameObject, "Create Curve Clip"); } curveTrack.ApplyModifiedProperties(); }
private void addNewCurveItem(CurveTrack track) { Undo.RegisterCreatedObjectUndo(CutsceneItemFactory.CreateActorClipCurve(track), "Created Actor Clip Curve"); }