예제 #1
0
        public override void OnInspectorGUI(NodeGUI node, AssetReferenceStreamManager streamManager, NodeGUIEditor editor, Action onValueChanged)
        {
            if (m_loadPath == null)
            {
                return;
            }

            EditorGUILayout.HelpBox("Load From Directory: Load assets from given directory path.", MessageType.Info);
            editor.UpdateNodeName(node);

            GUILayout.Space(10f);

            //Show target configuration tab
            editor.DrawPlatformSelector(node);
            using (new EditorGUILayout.VerticalScope(GUI.skin.box)) {
                var disabledScope = editor.DrawOverrideTargetToggle(node, m_loadPath.ContainsValueOf(editor.CurrentEditingGroup), (bool b) => {
                    using (new RecordUndoScope("Remove Target Load Path Settings", node, true)) {
                        if (b)
                        {
                            m_loadPath[editor.CurrentEditingGroup] = m_loadPath.DefaultValue;
                        }
                        else
                        {
                            m_loadPath.Remove(editor.CurrentEditingGroup);
                        }
                        onValueChanged();
                    }
                });

                using (disabledScope) {
                    var path = m_loadPath[editor.CurrentEditingGroup];
                    EditorGUILayout.LabelField("Load Path:");

                    string newLoadPath = null;

                    newLoadPath = editor.DrawFolderSelector(Model.Settings.Path.ASSETS_PATH, "Select Asset Folder",
                                                            path,
                                                            FileUtility.PathCombine(Model.Settings.Path.ASSETS_PATH, path),
                                                            (string folderSelected) => { return(NormalizeLoadPath(folderSelected)); }
                                                            );
                    if (newLoadPath != path)
                    {
                        using (new RecordUndoScope("Load Path Changed", node, true)){
                            m_loadPath[editor.CurrentEditingGroup] = newLoadPath;
                            onValueChanged();
                        }
                    }

                    var  dirPath   = Path.Combine(Model.Settings.Path.ASSETS_PATH, newLoadPath);
                    bool dirExists = Directory.Exists(dirPath);

                    GUILayout.Space(10f);

                    using (new EditorGUILayout.HorizontalScope()) {
                        using (new EditorGUI.DisabledScope(string.IsNullOrEmpty(newLoadPath) || !dirExists))
                        {
                            GUILayout.FlexibleSpace();
                            if (GUILayout.Button("Highlight in Project Window", GUILayout.Width(180f)))
                            {
                                // trailing is "/" not good for LoadMainAssetAtPath
                                if (dirPath[dirPath.Length - 1] == '/')
                                {
                                    dirPath = dirPath.Substring(0, dirPath.Length - 1);
                                }
                                var obj = AssetDatabase.LoadMainAssetAtPath(dirPath);
                                EditorGUIUtility.PingObject(obj);
                            }
                        }
                    }

                    if (!dirExists)
                    {
                        var  parentDirPath   = Path.GetDirectoryName(dirPath);
                        bool parentDirExists = Directory.Exists(parentDirPath);
                        if (parentDirExists)
                        {
                            EditorGUILayout.LabelField("Available Directories:");
                            string[] dirs = Directory.GetDirectories(parentDirPath);
                            foreach (string s in dirs)
                            {
                                EditorGUILayout.LabelField(s);
                            }
                        }
                    }
                }
            }
        }
예제 #2
0
        public override void OnInspectorGUI(NodeGUI node, AssetReferenceStreamManager streamManager, NodeGUIEditor editor, Action onValueChanged)
        {
            if (m_groupSizeByte == null)
            {
                return;
            }

            EditorGUILayout.HelpBox("Grouping by size: Create group of assets by size.", MessageType.Info);
            editor.UpdateNodeName(node);

            GUILayout.Space(10f);

            //Show target configuration tab
            editor.DrawPlatformSelector(node);
            using (new EditorGUILayout.VerticalScope(GUI.skin.box)) {
                var disabledScope = editor.DrawOverrideTargetToggle(node, m_groupSizeByte.ContainsValueOf(editor.CurrentEditingGroup), (bool enabled) => {
                    using (new RecordUndoScope("Remove Target Grouping Size Settings", node, true)){
                        if (enabled)
                        {
                            m_groupSizeByte[editor.CurrentEditingGroup] = m_groupSizeByte.DefaultValue;
                            m_groupingType[editor.CurrentEditingGroup]  = m_groupingType.DefaultValue;
                        }
                        else
                        {
                            m_groupSizeByte.Remove(editor.CurrentEditingGroup);
                            m_groupingType.Remove(editor.CurrentEditingGroup);
                        }
                        onValueChanged();
                    }
                });

                using (disabledScope) {
                    var newType = (GroupingType)EditorGUILayout.EnumPopup("Grouping Type", (GroupingType)m_groupingType[editor.CurrentEditingGroup]);
                    if (newType != (GroupingType)m_groupingType[editor.CurrentEditingGroup])
                    {
                        using (new RecordUndoScope("Change Grouping Type", node, true)){
                            m_groupingType[editor.CurrentEditingGroup] = (int)newType;
                            onValueChanged();
                        }
                    }

                    var newSizeText = EditorGUILayout.TextField("Size(KB)", m_groupSizeByte[editor.CurrentEditingGroup].ToString());
                    int newSize     = 0;
                    Int32.TryParse(newSizeText, out newSize);

                    if (newSize != m_groupSizeByte[editor.CurrentEditingGroup])
                    {
                        using (new RecordUndoScope("Change Grouping Size", node, true)){
                            m_groupSizeByte[editor.CurrentEditingGroup] = newSize;
                            onValueChanged();
                        }
                    }
                }
            }

            var newFreezeGroups = EditorGUILayout.ToggleLeft("Freeze group on build", m_freezeGroups);

            if (newFreezeGroups != m_freezeGroups)
            {
                using (new RecordUndoScope("Change Freeze Groups", node, true)){
                    m_freezeGroups = newFreezeGroups;
                    onValueChanged();
                }
            }
            EditorGUILayout.HelpBox("Freezing group will save group when build is performed, and any new asset from there will be put into new group.",
                                    MessageType.Info);
            using (new GUILayout.HorizontalScope()) {
                GUILayout.Label("Group setting");
                GUILayout.FlexibleSpace();
                if (GUILayout.Button("Import"))
                {
                    if (ImportGroupsWithGUI(node))
                    {
                        onValueChanged();
                    }
                }
                if (GUILayout.Button("Export"))
                {
                    ExportGroupsWithGUI(node);
                }
                if (GUILayout.Button("Reset"))
                {
                    if (EditorUtility.DisplayDialog("Do you want to reset group setting?", "This will erase current saved group setting.", "OK", "Cancel"))
                    {
                        m_savedGroups = null;
                        onValueChanged();
                    }
                }
            }
            GUILayout.Space(8f);

            if (m_groupViewController != null)
            {
                m_groupViewController.OnGroupViewGUI();
            }
        }
예제 #3
0
        public override void OnInspectorGUI(NodeGUI node, AssetReferenceStreamManager streamManager, NodeGUIEditor editor, Action onValueChanged)
        {
            EditorGUILayout.HelpBox("Assert Unwanted Assets In Bundle: Checks if unwanted assets are included in bundle configurations.", MessageType.Info);
            editor.UpdateNodeName(node);

            GUILayout.Space(10f);

            var newValue = (AssertionStyle)EditorGUILayout.EnumPopup("Assertion Style", m_style);

            if (newValue != m_style)
            {
                using (new RecordUndoScope("Change Assertion Style", node, true)) {
                    m_style = newValue;
                    onValueChanged();
                }
            }

            GUILayout.Space(4f);

            //Show target configuration tab
            editor.DrawPlatformSelector(node);
            using (new EditorGUILayout.VerticalScope(GUI.skin.box)) {
                var disabledScope = editor.DrawOverrideTargetToggle(node, m_path.ContainsValueOf(editor.CurrentEditingGroup), (bool b) => {
                    using (new RecordUndoScope("Remove Target Load Path Settings", node, true)) {
                        if (b)
                        {
                            m_path[editor.CurrentEditingGroup] = m_path.DefaultValue;
                        }
                        else
                        {
                            m_path.Remove(editor.CurrentEditingGroup);
                        }
                        onValueChanged();
                    }
                });

                using (disabledScope) {
                    var path = m_path[editor.CurrentEditingGroup];
                    EditorGUILayout.LabelField("Assertion Path:");

                    string newLoadPath = null;

                    newLoadPath = editor.DrawFolderSelector(Model.Settings.Path.ASSETS_PATH, "Select Asset Folder",
                                                            path,
                                                            FileUtility.PathCombine(Model.Settings.Path.ASSETS_PATH, path),
                                                            (string folderSelected) => {
                        var dataPath = Application.dataPath;
                        if (dataPath == folderSelected)
                        {
                            folderSelected = string.Empty;
                        }
                        else
                        {
                            var index = folderSelected.IndexOf(dataPath);
                            if (index >= 0)
                            {
                                folderSelected = folderSelected.Substring(dataPath.Length + index);
                                if (folderSelected.IndexOf('/') == 0)
                                {
                                    folderSelected = folderSelected.Substring(1);
                                }
                            }
                        }
                        return(folderSelected);
                    }
                                                            );

                    if (newLoadPath != path)
                    {
                        using (new RecordUndoScope("Path Change", node, true)){
                            m_path[editor.CurrentEditingGroup] = newLoadPath;
                            onValueChanged();
                        }
                    }

                    var  dirPath   = Path.Combine(Model.Settings.Path.ASSETS_PATH, newLoadPath);
                    bool dirExists = Directory.Exists(dirPath);

                    GUILayout.Space(10f);

                    using (new EditorGUILayout.HorizontalScope()) {
                        using (new EditorGUI.DisabledScope(string.IsNullOrEmpty(newLoadPath) || !dirExists))
                        {
                            GUILayout.FlexibleSpace();
                            if (GUILayout.Button("Highlight in Project Window", GUILayout.Width(180f)))
                            {
                                // trailing is "/" not good for LoadMainAssetAtPath
                                if (dirPath[dirPath.Length - 1] == '/')
                                {
                                    dirPath = dirPath.Substring(0, dirPath.Length - 1);
                                }
                                var obj = AssetDatabase.LoadMainAssetAtPath(dirPath);
                                EditorGUIUtility.PingObject(obj);
                            }
                        }
                    }
                }
            }
        }
예제 #4
0
        public override void OnInspectorGUI(NodeGUI node, AssetReferenceStreamManager streamManager, NodeGUIEditor editor, Action onValueChanged)
        {
            EditorGUILayout.HelpBox("Build Player: Build Player.", MessageType.Info);
            editor.UpdateNodeName(node);

            if (m_buildOptions == null)
            {
                return;
            }

            GUILayout.Space(10f);

            //Show target configuration tab
            editor.DrawPlatformSelector(node);
            using (new EditorGUILayout.VerticalScope(GUI.skin.box))
            {
                var disabledScope = editor.DrawOverrideTargetToggle(node, m_buildOptions.ContainsValueOf(editor.CurrentEditingGroup), (bool enabled) =>
                {
                    using (new RecordUndoScope("Remove Target Build Settings", node, true))
                    {
                        if (enabled)
                        {
                            m_buildOptions[editor.CurrentEditingGroup]   = m_buildOptions.DefaultValue;
                            m_buildLocations[editor.CurrentEditingGroup] = m_buildLocations.DefaultValue;
                            m_playerName[editor.CurrentEditingGroup]     = m_playerName.DefaultValue;
                            m_scenes[editor.CurrentEditingGroup]         = m_scenes.DefaultValue;
                        }
                        else
                        {
                            m_buildOptions.Remove(editor.CurrentEditingGroup);
                            m_buildLocations.Remove(editor.CurrentEditingGroup);
                            m_playerName.Remove(editor.CurrentEditingGroup);
                            m_scenes.Remove(editor.CurrentEditingGroup);
                        }
                        onValueChanged();
                    }
                });

                using (disabledScope)
                {
                    using (var scrollScope = new EditorGUILayout.ScrollViewScope(m_scroll))
                    {
                        m_scroll = scrollScope.scrollPosition;
                        GUILayout.Label("Player Build Location", "BoldLabel");
                        var newBuildLocation = editor.DrawFolderSelector("", "Select Build Location",
                                                                         m_buildLocations[editor.CurrentEditingGroup],
                                                                         Application.dataPath + "/../"
                                                                         );
                        if (newBuildLocation.StartsWith(Application.dataPath))
                        {
                            throw new NodeException("You can not build player inside Assets directory.", node.Id);
                        }

                        if (newBuildLocation != m_buildLocations[editor.CurrentEditingGroup])
                        {
                            using (new RecordUndoScope("Change Build Location", node, true))
                            {
                                m_buildLocations[editor.CurrentEditingGroup] = newBuildLocation;
                                onValueChanged();
                            }
                        }
                        GUILayout.Space(4f);
                        var newPlayerName = EditorGUILayout.TextField("Player Name", m_playerName[editor.CurrentEditingGroup]);
                        if (newPlayerName != m_playerName[editor.CurrentEditingGroup])
                        {
                            using (new RecordUndoScope("Change Player Name", node, true))
                            {
                                m_playerName[editor.CurrentEditingGroup] = newPlayerName;
                                onValueChanged();
                            }
                        }

                        GUILayout.Space(10f);
                        GUILayout.Label("Build Options", "BoldLabel");
                        int buildOptions = m_buildOptions[editor.CurrentEditingGroup];
                        foreach (var option in Model.Settings.BuildPlayerOptionsSettings)
                        {
                            // contains keyword == enabled. if not, disabled.
                            bool isEnabled = (buildOptions & (int)option.option) != 0;

                            var result = EditorGUILayout.ToggleLeft(option.description, isEnabled);
                            if (result != isEnabled)
                            {
                                using (new RecordUndoScope("Change Build Option", node, true))
                                {
                                    buildOptions = (result) ?
                                                   ((int)option.option | buildOptions) :
                                                   (((~(int)option.option)) & buildOptions);
                                    m_buildOptions[editor.CurrentEditingGroup] = buildOptions;
                                    onValueChanged();
                                }
                            }
                        }

                        var scenesInProject = AssetDatabase.FindAssets("t:Scene");
                        if (scenesInProject.Length > 0)
                        {
                            GUILayout.Space(10f);
                            GUILayout.Label("Scenes", "BoldLabel");

                            using (new EditorGUILayout.VerticalScope(GUI.skin.box))
                            {
                                var scenesSelected = m_scenes[editor.CurrentEditingGroup].Split(',');

                                foreach (var sceneGUID in scenesInProject)
                                {
                                    var path = AssetDatabase.GUIDToAssetPath(sceneGUID);
                                    if (string.IsNullOrEmpty(path))
                                    {
                                        ArrayUtility.Remove(ref scenesSelected, sceneGUID);
                                        m_scenes[editor.CurrentEditingGroup] = string.Join(",", scenesSelected);
                                        onValueChanged();
                                        continue;
                                    }
                                    var type = TypeUtility.GetTypeOfAsset(path);
                                    if (type != typeof(UnityEditor.SceneAsset))
                                    {
                                        continue;
                                    }

                                    var selected    = scenesSelected.Contains(sceneGUID);
                                    var newSelected = EditorGUILayout.ToggleLeft(path, selected);
                                    if (newSelected != selected)
                                    {
                                        using (new RecordUndoScope("Change Scene Selection", node, true))
                                        {
                                            if (newSelected)
                                            {
                                                ArrayUtility.Add(ref scenesSelected, sceneGUID);
                                            }
                                            else
                                            {
                                                ArrayUtility.Remove(ref scenesSelected, sceneGUID);
                                            }
                                            m_scenes[editor.CurrentEditingGroup] = string.Join(",", scenesSelected);
                                            onValueChanged();
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
예제 #5
0
        private void DrawGeneratorSetting(
            GeneratorEntry entry,
            NodeGUI node,
            AssetReferenceStreamManager streamManager,
            NodeGUIEditor editor,
            Action onValueChanged)
        {
            var generator = entry.m_instance.Get <IAssetGenerator>(editor.CurrentEditingGroup);

            using (new EditorGUILayout.VerticalScope(GUI.skin.box)) {
                var newName = EditorGUILayout.TextField("Name", entry.m_name);
                if (newName != entry.m_name)
                {
                    using (new RecordUndoScope("Change Name", node, true)) {
                        entry.m_name = newName;
                        UpdateGeneratorEntry(node.Data, entry);
                        // event must raise to propagate change to connection associated with point
                        NodeGUIUtility.NodeEventHandler(new NodeEvent(NodeEvent.EventType.EVENT_CONNECTIONPOINT_LABELCHANGED, node, Vector2.zero, GetConnectionPoint(node.Data, entry)));
                        onValueChanged();
                    }
                }

                var map = AssetGeneratorUtility.GetAttributeAssemblyQualifiedNameMap();
                if (map.Count > 0)
                {
                    using (new GUILayout.HorizontalScope()) {
                        GUILayout.Label("AssetGenerator");
                        var guiName = AssetGeneratorUtility.GetGUIName(entry.m_instance.ClassName);

                        if (GUILayout.Button(guiName, "Popup", GUILayout.MinWidth(150f)))
                        {
                            var builders = map.Keys.ToList();

                            if (builders.Count > 0)
                            {
                                NodeGUI.ShowTypeNamesMenu(guiName, builders, (string selectedGUIName) =>
                                {
                                    using (new RecordUndoScope("Change AssetGenerator class", node, true)) {
                                        generator = AssetGeneratorUtility.CreateGenerator(selectedGUIName);
                                        entry.m_instance.Set(editor.CurrentEditingGroup, generator);
                                        onValueChanged();
                                    }
                                }
                                                          );
                            }
                        }

                        MonoScript s = TypeUtility.LoadMonoScript(entry.m_instance.ClassName);

                        using (new EditorGUI.DisabledScope(s == null)) {
                            if (GUILayout.Button("Edit", GUILayout.Width(50)))
                            {
                                AssetDatabase.OpenAsset(s, 0);
                            }
                        }
                    }
                }
                else
                {
                    if (!string.IsNullOrEmpty(entry.m_instance.ClassName))
                    {
                        EditorGUILayout.HelpBox(
                            string.Format(
                                "Your AssetGenerator script {0} is missing from assembly. Did you delete script?", entry.m_instance.ClassName), MessageType.Info);
                    }
                    else
                    {
                        string[] menuNames = Model.Settings.GUI_TEXT_MENU_GENERATE_ASSETGENERATOR.Split('/');
                        EditorGUILayout.HelpBox(
                            string.Format(
                                "You need to create at least one AssetGenerator script to use this node. To start, select {0}>{1}>{2} menu and create new script from template.",
                                menuNames[1], menuNames[2], menuNames[3]
                                ), MessageType.Info);
                    }
                }

                GUILayout.Space(10f);

                editor.DrawPlatformSelector(node);
                using (new EditorGUILayout.VerticalScope()) {
                    var disabledScope = editor.DrawOverrideTargetToggle(node, entry.m_instance.ContainsValueOf(editor.CurrentEditingGroup), (bool enabled) => {
                        if (enabled)
                        {
                            entry.m_instance.CopyDefaultValueTo(editor.CurrentEditingGroup);
                        }
                        else
                        {
                            entry.m_instance.Remove(editor.CurrentEditingGroup);
                        }
                        onValueChanged();
                    });

                    using (disabledScope) {
                        if (generator != null)
                        {
                            Action onChangedAction = () => {
                                using (new RecordUndoScope("Change AssetGenerator Setting", node)) {
                                    entry.m_instance.Set(editor.CurrentEditingGroup, generator);
                                    onValueChanged();
                                }
                            };

                            generator.OnInspectorGUI(onChangedAction);
                        }
                    }
                }

                GUILayout.Space(4);

                if (GUILayout.Button("Remove Generator"))
                {
                    m_removingEntry = entry;
                }
            }
        }
예제 #6
0
        public override void OnInspectorGUI(NodeGUI node, AssetReferenceStreamManager streamManager, NodeGUIEditor editor, Action onValueChanged)
        {
            if (m_bundleNameTemplate == null)
            {
                return;
            }

            EditorGUILayout.HelpBox("Configure Bundle From Group: Create asset bundle settings from incoming group of assets.", MessageType.Info);
            editor.UpdateNodeName(node);

            GUILayout.Space(10f);

            using (new EditorGUILayout.VerticalScope(GUI.skin.box)) {
                var newUseGroupAsVariantValue = GUILayout.Toggle(m_useGroupAsVariants, "Use input group as variants");
                if (newUseGroupAsVariantValue != m_useGroupAsVariants)
                {
                    using (new RecordUndoScope("Change Bundle Config", node, true)){
                        m_useGroupAsVariants = newUseGroupAsVariantValue;

                        List <Variant> rv = new List <Variant>(m_variants);
                        foreach (var v in rv)
                        {
                            NodeGUIUtility.NodeEventHandler(
                                new NodeEvent(NodeEvent.EventType.EVENT_CONNECTIONPOINT_DELETED, node, Vector2.zero, GetConnectionPoint(node.Data, v)));
                            RemoveVariant(node.Data, v);
                        }
                        onValueChanged();
                    }
                }

                using (new EditorGUI.DisabledScope(newUseGroupAsVariantValue)) {
                    GUILayout.Label("Variants:");
                    var     variantNames = m_variants.Select(v => v.Name).ToList();
                    Variant removing     = null;
                    foreach (var v in m_variants)
                    {
                        using (new GUILayout.HorizontalScope()) {
                            if (GUILayout.Button("-", GUILayout.Width(30)))
                            {
                                removing = v;
                            }
                            else
                            {
                                GUIStyle s             = new GUIStyle((GUIStyle)"TextFieldDropDownText");
                                Action   makeStyleBold = () => {
                                    s.fontStyle = FontStyle.Bold;
                                    s.fontSize  = 12;
                                };

                                ValidateVariantName(v.Name, variantNames,
                                                    makeStyleBold,
                                                    makeStyleBold,
                                                    makeStyleBold);

                                var variantName = EditorGUILayout.TextField(v.Name, s);

                                if (variantName != v.Name)
                                {
                                    using (new RecordUndoScope("Change Variant Name", node, true)){
                                        v.Name = variantName;
                                        UpdateVariant(node.Data, v);
                                        onValueChanged();
                                    }
                                }
                            }
                        }
                    }
                    if (GUILayout.Button("+"))
                    {
                        using (new RecordUndoScope("Add Variant", node, true)){
                            if (m_variants.Count == 0)
                            {
                                NodeGUIUtility.NodeEventHandler(new NodeEvent(NodeEvent.EventType.EVENT_DELETE_ALL_CONNECTIONS_TO_POINT, node, Vector2.zero, node.Data.InputPoints[0]));
                            }
                            AddVariant(node.Data, Model.Settings.BUNDLECONFIG_VARIANTNAME_DEFAULT);
                            onValueChanged();
                        }
                    }
                    if (removing != null)
                    {
                        using (new RecordUndoScope("Remove Variant", node, true)){
                            // event must raise to remove connection associated with point
                            NodeGUIUtility.NodeEventHandler(new NodeEvent(NodeEvent.EventType.EVENT_CONNECTIONPOINT_DELETED, node, Vector2.zero, GetConnectionPoint(node.Data, removing)));
                            RemoveVariant(node.Data, removing);
                            onValueChanged();
                        }
                    }
                }
            }

            //Show target configuration tab
            editor.DrawPlatformSelector(node);
            using (new EditorGUILayout.VerticalScope(GUI.skin.box)) {
                var disabledScope = editor.DrawOverrideTargetToggle(node, m_bundleNameTemplate.ContainsValueOf(editor.CurrentEditingGroup), (bool enabled) => {
                    using (new RecordUndoScope("Remove Target Bundle Name Template Setting", node, true)){
                        if (enabled)
                        {
                            m_bundleNameTemplate[editor.CurrentEditingGroup] = m_bundleNameTemplate.DefaultValue;
                        }
                        else
                        {
                            m_bundleNameTemplate.Remove(editor.CurrentEditingGroup);
                        }
                        onValueChanged();
                    }
                });

                using (disabledScope) {
                    var bundleNameTemplate = EditorGUILayout.TextField("Bundle Name Template", m_bundleNameTemplate[editor.CurrentEditingGroup]).ToLower();

                    if (bundleNameTemplate != m_bundleNameTemplate[editor.CurrentEditingGroup])
                    {
                        using (new RecordUndoScope("Change Bundle Name Template", node, true)){
                            m_bundleNameTemplate[editor.CurrentEditingGroup] = bundleNameTemplate;
                            onValueChanged();
                        }
                    }
                }
            }
        }
예제 #7
0
        public override void OnInspectorGUI(NodeGUI node, AssetReferenceStreamManager streamManager, NodeGUIEditor editor, Action onValueChanged)
        {
            if (m_exportPath == null)
            {
                return;
            }

            var currentEditingGroup = editor.CurrentEditingGroup;

            EditorGUILayout.HelpBox("Export To Directory: Export given files to output directory.", MessageType.Info);
            editor.UpdateNodeName(node);

            GUILayout.Space(10f);

            //Show target configuration tab
            editor.DrawPlatformSelector(node);
            using (new EditorGUILayout.VerticalScope(GUI.skin.box)) {
                var disabledScope = editor.DrawOverrideTargetToggle(node, m_exportPath.ContainsValueOf(currentEditingGroup), (bool enabled) => {
                    using (new RecordUndoScope("Remove Target Export Settings", node, true)){
                        if (enabled)
                        {
                            m_exportPath[currentEditingGroup]   = m_exportPath.DefaultValue;
                            m_exportOption[currentEditingGroup] = m_exportOption.DefaultValue;
                            m_flattenDir[currentEditingGroup]   = m_flattenDir.DefaultValue;
                        }
                        else
                        {
                            m_exportPath.Remove(currentEditingGroup);
                            m_exportOption.Remove(currentEditingGroup);
                            m_flattenDir.Remove(currentEditingGroup);
                        }
                        onValueChanged();
                    }
                });

                using (disabledScope) {
                    ExportOption opt       = (ExportOption)m_exportOption[currentEditingGroup];
                    var          newOption = (ExportOption)EditorGUILayout.EnumPopup("Export Option", opt);
                    if (newOption != opt)
                    {
                        using (new RecordUndoScope("Change Export Option", node, true)){
                            m_exportOption[currentEditingGroup] = (int)newOption;
                            onValueChanged();
                        }
                    }

                    EditorGUILayout.LabelField("Export Path:");

                    string newExportPath = null;

                    newExportPath = editor.DrawFolderSelector("", "Select Export Folder",
                                                              m_exportPath[currentEditingGroup],
                                                              GetExportPath(m_exportPath[currentEditingGroup]),
                                                              (string folderSelected) => {
                        var projectPath = Directory.GetParent(Application.dataPath).ToString();

                        if (projectPath == folderSelected)
                        {
                            folderSelected = string.Empty;
                        }
                        else
                        {
                            var index = folderSelected.IndexOf(projectPath);
                            if (index >= 0)
                            {
                                folderSelected = folderSelected.Substring(projectPath.Length + index);
                                if (folderSelected.IndexOf('/') == 0)
                                {
                                    folderSelected = folderSelected.Substring(1);
                                }
                            }
                        }
                        return(folderSelected);
                    }
                                                              );
                    if (newExportPath != m_exportPath[currentEditingGroup])
                    {
                        using (new RecordUndoScope("Change Export Path", node, true)){
                            m_exportPath[currentEditingGroup] = newExportPath;
                            onValueChanged();
                        }
                    }

                    int flat    = m_flattenDir[currentEditingGroup];
                    var newFlat = EditorGUILayout.ToggleLeft("Flatten Directory", flat == 1) ? 1:0;
                    if (newFlat != flat)
                    {
                        using (new RecordUndoScope("Change Flatten Directory", node, true)){
                            m_flattenDir[currentEditingGroup] = newFlat;
                            onValueChanged();
                        }
                    }

                    var exporterNodePath = GetExportPath(newExportPath);
                    if (ValidateExportPath(
                            newExportPath,
                            exporterNodePath,
                            () => {
                    },
                            () => {
                        using (new EditorGUILayout.HorizontalScope()) {
                            EditorGUILayout.LabelField(exporterNodePath + " does not exist.");
                            if (GUILayout.Button("Create directory"))
                            {
                                Directory.CreateDirectory(exporterNodePath);
                            }
                            onValueChanged();
                        }
                        EditorGUILayout.Space();

                        string parentDir = Path.GetDirectoryName(exporterNodePath);
                        if (Directory.Exists(parentDir))
                        {
                            EditorGUILayout.LabelField("Available Directories:");
                            string[] dirs = Directory.GetDirectories(parentDir);
                            foreach (string s in dirs)
                            {
                                EditorGUILayout.LabelField(s);
                            }
                        }
                    }
                            ))
                    {
                        GUILayout.Space(10f);

                        using (new EditorGUILayout.HorizontalScope()) {
                            GUILayout.FlexibleSpace();
                                                        #if UNITY_EDITOR_OSX
                            string buttonName = "Reveal in Finder";
                                                        #else
                            string buttonName = "Show in Explorer";
                                                        #endif
                            if (GUILayout.Button(buttonName))
                            {
                                EditorUtility.RevealInFinder(exporterNodePath);
                            }
                        }
                    }
                }
            }
        }