private void OnClickRunBtn() { var setting = new ITU_RenderSetting { pixelsPreUnit = pixelPerUnit, renderChunkSize = chunkSize, defaultMaterial = tileMaterial == null ? new Material(Shader.Find("Unlit/Transparent")) : tileMaterial, isMakeAllGameObjectStatic = isStatic, isCreateInstanceOnSceneWhenFinish = createInstance, defaultSortLayerName = sortLayerName }; var savePath = saveProjectToPath.Substring(6); //Remove first "Assets" setting.SetSaveToFolder(savePath, Path.GetFileNameWithoutExtension(tmxFilePath)); if (ignoreLayers != null && ignoreLayers.Length > 0) { foreach (var ignoreLayer in ignoreLayers) { setting.ignoreRenderLayerNameList.Add(ignoreLayer); } } var itu = new ITU_Facade(); itu.LoadTxmFile(tmxFilePath); itu.SetRenderSetting(setting); itu.RenderMapToCurrentScene(); }
public override void OnClickRunBtn() { var itu = new ITU_Facade(); //Attach extension first var extNav = new ITU_GenNavMeshBlockExtension { navTempBlockMat = navTempBlockMaterial }; itu.AddExtensions(extNav); var extPrefab = new ITU_ReplaceWithPrefabExtension(); extPrefab.PrefabBoxDeco = PrefabBoxDeco; extPrefab.PrefabSupportDeco = PrefabSupportDeco; itu.AddExtensions(extPrefab); //Load Txm map itu.LoadTxmFile(Application.dataPath + txmFilePath); //Render var rednerSetting = new ITU_RenderSetting(); rednerSetting.SetSaveToFolder(saveProjectToPath, Path.GetFileNameWithoutExtension(txmFilePath)); rednerSetting.ignoreRenderLayerNameList.Add("Deco"); itu.SetRenderSetting(rednerSetting); itu.RenderMapToCurrentScene(); //Handle Property itu.HandleMapPropertyAndObject(); }
public override void OnClickRunBtn() { var setting = new ITU_RenderSetting(); setting.SetSaveToFolder(saveProjectToPath, Path.GetFileNameWithoutExtension(txmFilePath)); var itu = new ITU_Facade(); //Attach extension first itu.AddExtensions(new ITU_ReadTxmMapInfoExtension()); //Load Txm map itu.LoadTxmFile(Application.dataPath + txmFilePath); //Render itu.SetRenderSetting(setting); itu.RenderMapToCurrentScene(); }