Пример #1
0
        void OnWizardCreate()
        {
            string targetFilePath = EditorUtility.SaveFilePanel("Save scene", FileHelper.lastExportPath, "", "json");

            if (targetFilePath == "")
            {
                // cancel 버튼 처리
                return;
            }

            var pathHelper = new ExportPathHelper(targetFilePath);

            FileHelper.lastExportPath = pathHelper.RootPath;
            Report.rootPath           = pathHelper.RootPath;

            var report = Report.Instance();

            report.Level      = level;
            report.UseConsole = useConsole;

            //Debug.Log(string.Format("Exporting scene: {0}", EditorApplication.currentScene));
            Debug.Log(string.Format("Platform: {0}", SystemInfo.operatingSystem));
            Debug.Log(string.Format("Unity player: {0}", Application.unityVersion));

            var exporter = new SceneExporter(gameObjects, targetFilePath);

            exporter.Export();
        }
 public void ExpoortImageFile(ExportPathHelper pathHelper)
 {
     if (texcontainer != null)
     {
         string filename = pathHelper.ToFilePath(Name);
         texcontainer.Save(filename);
     }
 }
Пример #3
0
        public SceneExporter(GameObject[] gos, string targetFilePath)
        {
            pathHelper = new ExportPathHelper(targetFilePath);

            unitySceneRoot = new UnitySceneRoot();
            foreach (var go in gos)
            {
                unitySceneRoot.Add(go);
            }
        }
Пример #4
0
        public void Save(ExportPathHelper pathHelper)
        {
            var filepath = pathHelper.ToImagePath(ExportedFileName(".jpg"));

            Save(filepath, JpegQuality, LightmapBrightness, LightmapContrast);
        }
 public void Save(ExportPathHelper pathHelper)
 {
     Save(pathHelper.RootPath, JpegQuality, LightmapBrightness, LightmapContrast);
 }