public void DiaplayEditorView() { GUILayout.BeginHorizontal(); EditorGUILayout.LabelField("ClipName", GUILayout.Width(100)); Name = EditorGUILayout.TextField(Name); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); EditorGUILayout.LabelField("BeginTime", GUILayout.Width(100)); BeginTime = EditorGUILayout.FloatField(BeginTime); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); EditorGUILayout.LabelField("EndTime", GUILayout.Width(100)); EndTime = EditorGUILayout.FloatField(EndTime); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); EditorGUILayout.LabelField("AnimateObj", GUILayout.Width(100)); AnimateObj = (GameObject)EditorGUILayout.ObjectField(AnimateObj, typeof(GameObject), true); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); EditorGUILayout.LabelField("ActiveObjOperation", GUILayout.Width(100)); ActiveObjOperation = (GameObjectActiveOperation)EditorGUILayout.EnumPopup(ActiveObjOperation); GUILayout.EndHorizontal(); }
public void Clone(Clip obj) { if (obj == null) { return; } BeginTime = obj.BeginTime; EndTime = obj.EndTime; AnimateObj = obj.AnimateObj; ActiveObjOperation = obj.ActiveObjOperation; obj.GetAllAction(); if (obj.Actions != null && obj.Actions.Count > 0) { for (int i = 0; i < obj.Actions.Count; i++) { ClipAction action = obj.Actions[i]; if (action == null) { continue; } ClipAction newAction = AddAction(action.GetType()); if (newAction != null) { newAction.Clone(action); } } } }
public override void Clone(ClipAction obj) { base.Clone(obj); ActiveObjAction action = obj as ActiveObjAction; if (action != null) { ActiveObjOperation = action.ActiveObjOperation; OperationObj = action.OperationObj; } }
public override void DisplayEditorView() { base.DisplayEditorView(); GUILayout.BeginHorizontal(); EditorGUILayout.LabelField("OperationObj", GUILayout.Width(100)); OperationObj = (GameObject)EditorGUILayout.ObjectField(OperationObj, typeof(GameObject), true); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Operation", GUILayout.Width(100)); ActiveObjOperation = (GameObjectActiveOperation)EditorGUILayout.EnumPopup(ActiveObjOperation); GUILayout.EndHorizontal(); }