protected virtual void DrawActions() { foldouts.actionFoldout = EditorWindowTools.EditorGUILayoutFoldout("Actions", "Perform these actions when trigger fires.", foldouts.actionFoldout); if (foldouts.actionFoldout) { try { EditorWindowTools.EditorGUILayoutBeginGroup(); EditorGUILayout.BeginHorizontal(); if (showSetQuestStateAction || showRunLuaCodeAction || showPlaySequenceAction || showAlertAction || showSendMessagesAction || showBarkAction || showConversationAction || showSetActiveAction || showSetEnabledAction || showAnimatorStatesAction || showUnityEventAction) { EditorGUILayout.LabelField("Actions are performed in this order:", EditorTools.GUILayoutLabelWidth("Actions are performed in this order:")); } else { EditorGUILayout.LabelField("Click Add Action:", EditorTools.GUILayoutLabelWidth("Click Add Action to add new action types:")); } GUILayout.FlexibleSpace(); EditorGUI.BeginDisabledGroup(showSetQuestStateAction && showRunLuaCodeAction && showPlaySequenceAction && showAlertAction && showSendMessagesAction && showBarkAction && showConversationAction && showSetActiveAction && showSetEnabledAction && showAnimatorStatesAction && showUnityEventAction); if (GUILayout.Button("Add Action", EditorTools.GUILayoutButtonWidth("Add Action"))) { ShowAddActionMenu(); } EditorGUI.EndDisabledGroup(); EditorGUILayout.EndHorizontal(); if (showSetQuestStateAction) { DrawQuestAction(); } if (showRunLuaCodeAction) { DrawLuaAction(); } if (showPlaySequenceAction) { DrawSequenceAction(); } if (showAlertAction) { DrawAlertAction(); } if (showSendMessagesAction) { DrawSendMessageAction(); } if (showBarkAction) { DrawBarkAction(); } if (showConversationAction) { DrawConversationAction(); } if (showSetActiveAction) { DrawSetActiveAction(); } if (showSetEnabledAction) { DrawSetEnabledAction(); } if (showAnimatorStatesAction) { DrawSetAnimatorStateAction(); } if (showUnityEventAction) { DrawUnityEventAction(); } } finally { EditorWindowTools.EditorGUILayoutEndGroup(); } } }