Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 25f2947

Browse files
use init script on new project creation (if asset folder exists, but its empty folder) fixes #190
1 parent beadc28 commit 25f2947

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

‎UnityLauncherPro/MainWindow.xaml.cs‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,13 +330,15 @@ void HandleCommandLineLaunch()
330330
// NOTE if keydown, window doesnt become active and focused
331331
if (string.IsNullOrEmpty(version) || (Keyboard.Modifiers & ModifierKeys.Shift) != 0)
332332
{
333-
if (Directory.Exists(Path.Combine(proj.Path, "Assets")) == true)
333+
// if Assets folder exists, then its existing project
334+
if (Directory.Exists(Path.Combine(proj.Path, "Assets")) == true && (Directory.GetFiles(Path.Combine(proj.Path, "Assets")).Length > 0))
334335
{
335-
Tools.DisplayUpgradeDialog(proj, null, false);
336+
bool useInitScript = (bool)chkUseInitScript.IsChecked;
337+
338+
Tools.DisplayUpgradeDialog(proj, null, useInitScript);
336339
}
337-
else // no assets folder here, then its new project
340+
else // no Assets folder here OR Assets folder is empty, then its new project
338341
{
339-
//Tools.DisplayUpgradeDialog(proj, null);
340342
CreateNewEmptyProject(proj.Path);
341343
}
342344
}
@@ -1315,7 +1317,7 @@ private void BtnUpgradeProject_Click(object sender, RoutedEventArgs e)
13151317
var proj = GetSelectedProject();
13161318
if (proj == null) return;
13171319

1318-
Tools.DisplayUpgradeDialog(proj,this, false);
1320+
Tools.DisplayUpgradeDialog(proj:proj,owner:this,useInitScript: false);
13191321
}
13201322

13211323
private void GridRecent_Loaded(object sender, RoutedEventArgs e)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /