Beispiel #1
0
        public void SearchAllScenes()
        {
            ExportSceneList exportSceneList = target as ExportSceneList;

            if (exportSceneList.exportScenes == null)
            {
                exportSceneList.exportScenes = new List <ExportSceneList.ExportSceneItem>();
            }
            else
            {
                exportSceneList.exportScenes.Clear();
            }

            var scenes = UnityEditor.EditorBuildSettings.scenes;

            foreach (var scene in scenes)
            {
                try
                {
                    exportSceneList.exportScenes.Add(new ExportSceneList.ExportSceneItem(scene.path));
                }
                catch (ArgumentException e)
                {
                    // 被添加的Scene不存在,不做处理
                }
            }
        }
            private void OnEnable()
            {
                unityPluginConfig       = DirectoryUtil.CreateScriptableObject <UnityPluginConfig>("preset/plugins-script", false);
                unityPluginConfigEditor = Editor.CreateEditor(unityPluginConfig) as UnityPluginConfigEditor;

                projectScriptExportConfig       = DirectoryUtil.CreateScriptableObject <ProjectExportConfig>("preset/project-script", false);
                projectScriptExportConfigEditor = Editor.CreateEditor(projectScriptExportConfig) as ProjectExportConfigEditor;

                // scenes
                hierarchyExportConfig       = DirectoryUtil.CreateScriptableObject <HierarchyExportConfig>("quickexport/hierarchy", false);
                hierarchyExportConfigEditor = Editor.CreateEditor(hierarchyExportConfig) as HierarchyExportConfigEditor;
                sceneExportConfig           = DirectoryUtil.CreateScriptableObject <ExportSceneList>("quickexport/scenes", false);
                sceneExportEditor           = Editor.CreateEditor(sceneExportConfig) as ExportSceneListEditor;

                directoryExportConfig = DirectoryUtil.CreateScriptableObject <ExportDirectoryList>("quickexport/directories", false);
                directoryExportEditor = Editor.CreateEditor(directoryExportConfig) as ExportDirectoryListEditor;

                globalConfig       = DirectoryUtil.CreateScriptableObject <GlobalConfig>("bridge/entry/GlobalConfig", false);
                globalConfigEditor = Editor.CreateEditor(globalConfig) as GlobalConfigEditor;

                rawResourceExportConfig       = DirectoryUtil.CreateScriptableObject <RawResourceExportConfig>("quickexport/rawres", false);
                rawResourceExportConfigEditor = Editor.CreateEditor(rawResourceExportConfig) as RawResourceExportConfigEditor;

                BeefBall.DoInstallationCheck();

                ConfigManager.Init();
            }