Exemplo n.º 1
0
	void beginCurrentSceneExport(){
		var scene = EditorSceneManager.GetActiveScene();
		if (!scene.IsValid()){
			Debug.LogWarningFormat("No active scene, cannot export.");
		}
		
		if (!checkTargetPath(targetPath))
			return;
					
		var logger = new Logger();						
		var proj = JsonProject.fromScene(scene, true);
		proj.saveToFile(targetPath, true, true, logger);
		ExportResultWindow.openWindow(logger);
	}
Exemplo n.º 2
0
        public static void  exportJsonSceneProj(MenuCommand menuCommand)
        {
            var scene = EditorSceneManager.GetActiveScene();

            if (!scene.IsValid())
            {
                Debug.LogWarningFormat("No active scene, cannot export.");
            }

            var path = EditorUtility.SaveFilePanel("Save category config", "", scene.name, "json");

            if (path == string.Empty)
            {
                return;
            }

            var logger = new Logger();
            var proj   = JsonProject.fromScene(scene, true);

            proj.saveToFile(path, true, true, logger);
            ExportResultWindow.openWindow(logger);
        }