private void DrawBuildGUI() { selectedViewer = viewerBuildsGUI.CurrentPack; showViewerSelecting = EditorGUILayout.Foldout(showViewerSelecting, $"Viewer: {selectedViewer?.Version ?? "NOT SELECTED"}"); if (showViewerSelecting) { EditorGUI.indentLevel++; viewerBuildsGUI.Draw(); EditorGUI.indentLevel--; } selectedDesktopClient = desktopClientBuildsGUI.CurrentPack; showDesktopClientSelecting = EditorGUILayout.Foldout(showDesktopClientSelecting, $"Desktop client: {selectedDesktopClient?.Version ?? "NOT SELECTED"}"); if (showDesktopClientSelecting) { EditorGUI.indentLevel++; desktopClientBuildsGUI.Draw(); EditorGUI.indentLevel--; } EditorGUILayout.Space(); EditorGUILayout.LabelField("Exporting excursion", EditorStyles.boldLabel); DrawExportingSection(); EditorGUILayout.Space(); DrawExportButton(selectedViewer, selectedDesktopClient); }
private static void UnpackDesktopClient(DesktopClientBuildPack desktopClientBuildPack, string folderPath) { foreach (var file in Directory .GetFiles(desktopClientBuildPack.FolderLocation) .Where(f => !f.EndsWith(".meta"))) { File.Copy(file, Path.Combine(folderPath, Path.GetFileName(file))); } }
public ExportOptions( WebViewerBuildPack viewerPack, DesktopClientBuildPack desktopClientBuildPack, string folderPath, int imageCroppingLevel) : base(ResourceHandlePath.CopyToDist, imageCroppingLevel) { FolderPath = folderPath; ViewerPack = viewerPack; DesktopClientBuildPack = desktopClientBuildPack; }
private void DrawExportButton(WebViewerBuildPack selectedViewer, DesktopClientBuildPack selectedDesktopClient) { if (GUILayout.Button("Export")) { if (selectedViewer == null || selectedDesktopClient == null) { EditorUtility.DisplayDialog("Error", $"Please, select viewer and desktop client versions", "Ok"); return; } if (!TourExporter.TryGetTargetFolder(outFolderPath)) { return; } TourExporter.ExportTour(new TourExporter.ExportOptions(selectedViewer, selectedDesktopClient, outFolderPath, imageCroppingLevel)); } }