Ejemplo n.º 1
0
        private static void BakeSingleSceneByConfig(OCSceneConfig config)
        {
            Debug.Log("batch mode Do bake single");
            ConfigGenerator(config);
            if (!Util.IsSceneOpened(config.SceneNamePattern))
            {
                Debug.LogFormat("batch mode Open Scene {0}", config.SceneNamePattern);
                EditorSceneManager.OpenScene(String.Format("{0}/{1}.unity", config.GetSceneAssetPath(), config.SceneNamePattern));
            }


            var scene = new SingleScene(config.GetSceneAssetPath(), config.SceneNamePattern, Index.InValidIndex);

            scene.tempPath = config.TemporaryContainer;
            scene.Bake(config.ComputePerframe, config.TemporaryContainer);
        }
Ejemplo n.º 2
0
        public void BakeSingleScene()
        {
            //var config = GetSceneConfig(gameObject.scene.name);

            //if (string.IsNullOrEmpty(config.MapName))
            //{
            InitConfig();
            _scene = new SingleScene(GetScenePath(), gameObject.scene.name, Index.InValidIndex);
            _scene.Bake(Config.ComputePerframe, "D;/OCTemp");
            //}
            //else
            //{
            //ConfigGenerator(config);
            //_scene = new SingleScene(config.GetSceneAssetPath(), config.SceneNamePattern, Index.InValidIndex);
            //_scene.Bake(config.ComputePerframe, config.TemporaryContainer);
            //}
        }
Ejemplo n.º 3
0
        public static void TestBakeAll(string sceneName)
        {
            var config = GetSceneConfig(sceneName);

            ConfigGenerator(config);

            if (config.IsStreamScene)
            {
                var multiScene = new MultiScene(config.GetSceneAssetPath(), config.SceneNamePattern, config.TileDimension, config.TileSize);
                multiScene.BakeTiles(config.indices, config.ComputePerframe, config.TemporaryContainer);
            }
            else
            {
                var scene = new SingleScene(config.GetSceneAssetPath(), config.SceneNamePattern, Index.InValidIndex);
                scene.Bake(true, "D:/OCTemp");
            }
        }