Skip to content

Commit 6f7ccf7

Browse files
committed
add initscript for new quick projects started without name dialog, hide console window on process start (it was visible in unity 2023, not visible in older versions(?)), set enableProjectRename and showTargetPlatform settings as true by default)
1 parent 9b77461 commit 6f7ccf7

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

UnityLauncherPro/MainWindow.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,8 +1845,8 @@ void CreateNewEmptyProject(string targetFolder = null)
18451845
{
18461846
newVersion = GetSelectedUnity().Version == null ? preferredVersion : GetSelectedUnity().Version;
18471847
}
1848-
// TODO custom init file here also
1849-
var p = Tools.FastCreateProject(newVersion, rootFolder);
1848+
var p = Tools.FastCreateProject(newVersion, rootFolder, null, null, null, null, (bool)chkUseInitScript.IsChecked, txtCustomInitFile.Text);
1849+
18501850
if (p != null) AddNewProjectToList(p);
18511851
}
18521852

UnityLauncherPro/Properties/Settings.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnityLauncherPro/Properties/Settings.settings

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@
4545
<Value Profile="(Default)">True</Value>
4646
</Setting>
4747
<Setting Name="enableProjectRename" Type="System.Boolean" Scope="User">
48-
<Value Profile="(Default)">False</Value>
48+
<Value Profile="(Default)">True</Value>
4949
</Setting>
5050
<Setting Name="streamerMode" Type="System.Boolean" Scope="User">
5151
<Value Profile="(Default)">False</Value>
5252
</Setting>
5353
<Setting Name="showTargetPlatform" Type="System.Boolean" Scope="User">
54-
<Value Profile="(Default)">False</Value>
54+
<Value Profile="(Default)">True</Value>
5555
</Setting>
5656
<Setting Name="webglBuildPath" Type="System.String" Scope="User">
5757
<Value Profile="(Default)" />

UnityLauncherPro/Tools.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ public static Process LaunchProject(Project proj, DataGrid dataGridRef = null, b
301301

302302
newProcess.StartInfo.Arguments = unitycommandlineparameters;
303303
newProcess.EnableRaisingEvents = true;
304+
newProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; // needed for unity 2023 for some reason? (otherwise console popups briefly)
304305
newProcess.Start();
305306

306307
if (Properties.Settings.Default.closeAfterProject)

0 commit comments

Comments
 (0)