Esempio n. 1
0
        private void DrawInstalledList()
        {
            if (GUILayout.Button("Download last viewer version"))
            {
                StartBackgroundTask(DownloadViewer(packsLocation));
            }
            GUILayout.BeginHorizontal();
            GUILayout.Label("Available viewers", EditorStyles.boldLabel);
            if (GUILayout.Button("Refresh"))
            {
                FindBuildPacks();
            }

            GUILayout.EndHorizontal();
            if (buildPacks.Count == 0)
            {
                GUILayout.Label("No web viewers", EditorStyles.label);
            }
            else
            {
                foreach (var pack in buildPacks)
                {
                    pack.IsFolded = EditorGUILayout.Foldout(pack.IsFolded, pack.Version);
                    if (pack.IsFolded)
                    {
                        RenderPack(pack);
                    }
                }
            }

            EditorGUILayout.Space();

            EditorGUILayout.LabelField("Exporting excursion", EditorStyles.boldLabel);
            selectedbuildTagNum = EditorGUILayout.Popup("Viewer version", selectedbuildTagNum, buildPackTags);
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.PrefixLabel("Target path");
            outFolderPath = EditorGUILayout.TextField(outFolderPath);
            if (GUILayout.Button("..."))
            {
                outFolderPath = EditorUtility.OpenFolderPanel("Select folder to export", outFolderPath, "");
                Repaint();
                SceneView.RepaintAll();
            }
            EditorGUILayout.EndHorizontal();

            if (GUILayout.Button("Export"))
            {
                if (!TourExporter.TryGetTargetFolder(outFolderPath))
                {
                    return;
                }
                TourExporter.ExportTour(buildPacks[selectedbuildTagNum].Location, outFolderPath);
            }
        }
Esempio n. 2
0
 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));
     }
 }