Exemplo n.º 1
0
        static void Init()
        {
            Flush();
            InGameConsoleEditor window =
                (InGameConsoleEditor)EditorWindow.GetWindow(typeof(InGameConsoleEditor));

            //consolePrefab = AssetDatabase.LoadAssetAtPath(consolePath, typeof(GameObject));
            consolePrefab = GetUserDefinedPrefab();
            if (consolePath != null)
            {
                GetSettings(consolePrefab);
            }
        }
Exemplo n.º 2
0
        public void OnPreprocessBuild(BuildReport report)
        {
            string initialScene = SceneManager.GetActiveScene().path;

            Scene sene = SceneManager.GetActiveScene();

            int scenesInBuild = EditorBuildSettings.scenes.Count();

            for (int i = 0; i < scenesInBuild; i++)
            {
                var scene  = EditorBuildSettings.scenes[i];
                var toload = EditorSceneManager.OpenScene(scene.path, OpenSceneMode.Single);
                InGameConsoleEditor.CreateConsoleOnBuild(toload);
            }

            EditorSceneManager.OpenScene(initialScene, OpenSceneMode.Single);
        }