Skip to content

Commit e54991a

Browse files
committed
dont create Scripts folder at init #207
1 parent fd8d999 commit e54991a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

UnityLauncherPro/MainWindow.xaml.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public partial class MainWindow : Window
4343
public static readonly string projectNameFile = "ProjectName.txt";
4444
public static string preferredVersion = null;
4545
public static int projectNameSetting = 0; // 0 = folder or ProjectName.txt if exists, 1=ProductName
46-
public static readonly string initScriptFileFullPath = Tools.GetSafeFilePath("Scripts", "InitializeProject.cs");
46+
public static string initScriptFileFullPath;
4747

4848
const string contextRegRoot = "Software\\Classes\\Directory\\Background\\shell";
4949
const string githubURL = "https://github.com/unitycoder/UnityLauncherPro";
@@ -3835,6 +3835,11 @@ private void tabControl_PreviewKeyDown(object sender, KeyEventArgs e)
38353835

38363836
private void btnFetchLatestInitScript_Click(object sender, RoutedEventArgs e)
38373837
{
3838+
if (string.IsNullOrEmpty(initScriptFileFullPath) == true)
3839+
{
3840+
initScriptFileFullPath = Tools.GetSafeFilePath("Scripts","InitializeProject.cs");
3841+
}
3842+
38383843
Tools.DownloadInitScript(initScriptFileFullPath, txtCustomInitFileURL.Text);
38393844
}
38403845

0 commit comments

Comments
 (0)