| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e1edf08 commit f2fc7fa
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -886,6 +886,8 @@ void UpdateUnityInstallationsList() | |||
| 886 | 886 | } | |
| 887 | 887 | ||
| 888 | 888 | lblFoundXInstallations.Content = "Found " + unityInstallationsSource.Count + " installations"; | |
| 889 | + | ||
| 890 | + btnCreateEmptyProject.IsEnabled = unityInstallationsSource.Count > 0; | ||
| 889 | 891 | } | |
| 890 | 892 | ||
| 891 | 893 | Project GetSelectedProject() | |
@@ -2099,6 +2101,9 @@ void CreateNewEmptyProject(string targetFolder = null) | |||
| 2099 | 2101 | } | |
| 2100 | 2102 | } | |
| 2101 | 2103 | ||
| 2104 | + // refresh unity installations | ||
| 2105 | + UpdateUnityInstallationsList(); | ||
| 2106 | + | ||
| 2102 | 2107 | if (string.IsNullOrEmpty(initScriptFileFullPath) == true) | |
| 2103 | 2108 | { | |
| 2104 | 2109 | initScriptFileFullPath = Tools.GetSafeFilePath("Scripts", "InitializeProject.cs"); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,7 @@ | |||
| 1 | 1 | using System; | |
| 2 | 2 | using System.Collections.Generic; | |
| 3 | 3 | using System.IO; | |
| 4 | + using System.Linq; | ||
| 4 | 5 | using System.Net.Http; | |
| 5 | 6 | using System.Text; | |
| 6 | 7 | using System.Threading; | |
@@ -53,6 +54,18 @@ public NewProject(string unityVersion, string suggestedName, string targetFolder | |||
| 53 | 54 | txtNewProjectName.Text = newName; | |
| 54 | 55 | txtNewProjectFolder.Text = targetFolder; | |
| 55 | 56 | ||
| 57 | + if (MainWindow.unityInstallationsSource.Count == 0) | ||
| 58 | + { | ||
| 59 | + Tools.SetStatus("No Unity installations found! Please add Unity installations first."); | ||
| 60 | + isInitializing = false; | ||
| 61 | + btnCreateNewProject.IsEnabled = false; | ||
| 62 | + return; | ||
| 63 | + } | ||
| 64 | + else | ||
| 65 | + { | ||
| 66 | + btnCreateNewProject.IsEnabled = true; | ||
| 67 | + } | ||
| 68 | + | ||
| 56 | 69 | // fill available versions | |
| 57 | 70 | if (gridAvailableVersions.ItemsSource == null) | |
| 58 | 71 | { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments