public override void OnInspectorGUI() { base.OnInspectorGUI(); bool isSmoothSnap = so[snapStyleField].enumValueIndex == (int)Cue.SnapPlayerStyle.Smooth; GUIUtils.StartCustomEditor(); GUIUtils.StartBox(0); EditorGUILayout.BeginHorizontal(); GUIUtils.Label(msgBlocksLabel); if (GUIUtils.SmallButton(new GUIContent("", "Paste"), Colors.green, Colors.black)) { for (int i = 0; i < 4; i++) { so[messageBlocksField][i].SetValue(copiedMessages[i]); } } if (GUIUtils.SmallButton(new GUIContent("", "Copy"), Colors.yellow, Colors.black)) { for (int i = 0; i < 4; i++) { copiedMessages[i] = so[messageBlocksField][i].stringValue; } } if (GUIUtils.SmallDeleteButton()) { for (int i = 0; i < 4; i++) { so[messageBlocksField][i].SetValue(""); } } EditorGUILayout.EndHorizontal(); GUIUtils.Tabs((isSmoothSnap ? 4 : 3).Generate(i => tabLbls[i]).ToArray(), ref currentMsgBlock); GUIUtils.DrawMultiLineExpandableString(so[messageBlocksField][currentMsgBlock], false, "mesage block", 50); GUIUtils.EndBox(1); GUIUtils.StartBox(1); EditorGUI.indentLevel++; GUIUtils.DrawEnumProp( so[snapStyleField], snapStyleGUI, (int i) => (Cue.SnapPlayerStyle)i, (System.Enum s) => (int)((Cue.SnapPlayerStyle)s) ); if (isSmoothSnap) { EditorGUI.indentLevel++; GUIUtils.DrawProp(so[smoothPosTimeField], positionTimeGUI); GUIUtils.DrawProp(so[smoothRotTimeField], rotationTimeGUI); GUIUtils.DrawToggleProp(so[playImmediateField], playImmediateGUI); EditorGUI.indentLevel--; } GUIUtils.DrawProp(so[positionOffsetField], positionOffsetGUI); GUIUtils.DrawProp(so[rotationOffsetField], rotationOffsetGUI); GUIUtils.EndBox(1); GUIUtils.Space(); EditorGUI.indentLevel--; GUIUtils.Label(new GUIContent("<b>The following variables wont be used if the cue has sub-cues:</b>")); EditorGUI.indentLevel++; GUIUtils.StartBox(1); GUIUtils.DrawProp(so[overrideDurationField], overrideDurationGUI); EditorGUI.indentLevel--; GUIUtils.Space(); GUIUtils.DrawObjArrayProp <Event>(so[eventsField]); GUIUtils.EndBox(1); GUIUtils.EndCustomEditor(so); }