protected override void Draw()
        {
            base.Draw();
            var groupNumberProperty = serializedObject.FindProperty("m_groupNumber");
            var actionListProperty  = serializedObject.FindProperty("m_actionList");

            UnityEngine.Assertions.Assert.IsNotNull(groupNumberProperty, "Quest Machine: Internal error - m_groupNumber is null.");
            UnityEngine.Assertions.Assert.IsNotNull(actionListProperty, "Quest Machine: Internal error - m_actionList is null.");
            if (groupNumberProperty == null || actionListProperty == null)
            {
                return;
            }
            bool useGroup = groupNumberProperty.intValue != ButtonQuestContent.NoGroup;

            EditorGUI.BeginChangeCheck();
            useGroup = EditorGUILayout.Toggle(m_groupToggleGUIContent, useGroup);
            if (EditorGUI.EndChangeCheck())
            {
                groupNumberProperty.intValue = useGroup ? 0 : ButtonQuestContent.NoGroup;
            }
            if (useGroup)
            {
                EditorGUILayout.PropertyField(groupNumberProperty);
            }
            m_actionListDrawer.Draw(actionListProperty);
        }
        public void Draw(SerializedObject serializedObject, SerializedProperty stateInfoProperty, int nodeIndex, QuestState questState)
        {
            if (serializedObject == null || stateInfoProperty == null)
            {
                return;
            }

            var foldout    = QuestEditorPrefs.GetQuestStateFoldout(questState, nodeIndex);
            var newFoldout = QuestEditorUtility.EditorGUILayoutFoldout(questState.ToString(), string.Empty, foldout, false);

            if (newFoldout != foldout)
            {
                QuestEditorPrefs.ToggleQuestStateFoldout(questState, nodeIndex);
            }
            if (!newFoldout)
            {
                return;
            }

            if (m_categorizedContentDrawer == null)
            {
                m_categorizedContentDrawer = new CategorizedQuestContentInspectorGUI();
            }
            if (m_questActionListDrawer == null)
            {
                m_questActionListDrawer = new QuestActionListInspectorGUI(new GUIContent("Actions", "Actions that run when the quest enters this state."));
            }
            QuestEditorUtility.EditorGUILayoutBeginIndent();

            var categorizedContentListProperty = stateInfoProperty.FindPropertyRelative("m_categorizedContentList");

            m_categorizedContentDrawer.Draw(serializedObject, categorizedContentListProperty);

            var actionListProperty = stateInfoProperty.FindPropertyRelative("m_actionList");

            m_questActionListDrawer.Draw(actionListProperty);

            QuestEditorUtility.EditorGUILayoutEndIndent();
            EditorGUILayout.Space();
        }