Esempio n. 1
0
        void ShowContainer()
        {
            subContainersProperty = currentContainerProperty.FindPropertyRelative("subContainers");

            if (currentContainerProperty.isExpanded)
            {
                EditorGUI.indentLevel += 1;

                EditorGUI.BeginDisabledGroup(Application.isPlaying);
                EditorGUI.BeginChangeCheck();
                string containerName = EditorGUILayout.TextField(currentContainer.Name);
                if (EditorGUI.EndChangeCheck())
                {
                    currentContainer.SetUniqueName(containerName, currentContainer.Name, "default", containerManager.containers);
                }
                EditorGUI.EndDisabledGroup();

                currentContainer.type = (PureDataContainer.Types)EditorGUILayout.EnumPopup(currentContainer.type);

                BeginBox();

                if (currentContainer.type == PureDataContainer.Types.SwitchContainer)
                {
                    ShowSwitchContainerEnums(currentContainerProperty, currentContainer.switchSettings);
                }

                ShowSources();

                if (subContainersProperty.isExpanded)
                {
                    EditorGUI.indentLevel += 1;

                    ShowSubContainers(currentContainer.childrenIds);

                    EditorGUI.indentLevel -= 1;
                }

                EndBox();

                Separator();

                EditorGUI.indentLevel -= 1;
            }
        }