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); }
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); }