void beginSelectedObjectsExport(){ var objects = ExportUtility.getSelectedGameObjects(); if (objects.Count <= 0) return; if (!checkTargetPath(targetPath)) return; var logger = new Logger(); var proj = JsonProject.fromObjects(objects.ToArray(), true); proj.saveToFile(targetPath, true, true, logger); ExportResultWindow.openWindow(logger); }
public static void exportSelectedObjectsProj(MenuCommand menuCommand) { var objects = ExportUtility.getSelectedGameObjects(); if (objects.Count <= 0) { return; } var path = EditorUtility.SaveFilePanel("Export selected objects", "", objects[0].name, "json"); if (path == string.Empty) { return; } var logger = new Logger(); var proj = JsonProject.fromObjects(objects.ToArray(), true); proj.saveToFile(path, true, true, logger); ExportResultWindow.openWindow(logger); }