internal static MultiCurveTrack CreateMultiActorCurveTrack(MultiActorTrackGroup trackGroup) { GameObject curveTrackGO = new GameObject(CURVE_TRACK_LABEL, typeof(MultiCurveTrack)); curveTrackGO.transform.parent = trackGroup.transform; return(curveTrackGO.GetComponent <MultiCurveTrack>()); }
internal static ActorItemTrack CreateActorItemTrack(MultiActorTrackGroup trackGroup) { GameObject eventTrackGO = new GameObject(EVENT_TRACK_LABEL, typeof(ActorItemTrack)); eventTrackGO.transform.parent = trackGroup.transform; return(eventTrackGO.GetComponent <ActorItemTrack>()); }
/// <summary> /// Draw the inspector /// </summary> public override void OnInspectorGUI() { base.DrawDefaultInspector(); MultiActorTrackGroup multiActorGroup = base.serializedObject.targetObject as MultiActorTrackGroup; //base.serializedObject.Update(); //EditorGUILayout.PropertyField(actors, actorsContent); if (GUILayout.Button(addTrackContent)) { CutsceneControlHelper.ShowAddTrackContextMenu(multiActorGroup); } if (isShowdic ? GUILayout.Button(noShowdic) : GUILayout.Button(showdic)) { isShowdic = !isShowdic; } //base.serializedObject.ApplyModifiedProperties(); if (isShowdic) { base.OnInspectorGUI(); } }
private void addEventTrack() { MultiActorTrackGroup actorTrackGroup = base.serializedObject.targetObject as MultiActorTrackGroup; Undo.RegisterCreatedObjectUndo(CutsceneItemFactory.CreateActorItemTrack(actorTrackGroup).gameObject, "Create Actor Track"); }
private void addActorTrack() { MultiActorTrackGroup matg = TrackGroup.Behaviour as MultiActorTrackGroup; Undo.RegisterCreatedObjectUndo(CutsceneItemFactory.CreateActorItemTrack(matg).gameObject, "Create Actor Track"); }