Skip to content

Commit 50eb99c

Browse files
committed
Merge branch 'develop' of github.com:PaulNonatomic/UnityQuickStartCli into develop
2 parents c0f9402 + 43fe240 commit 50eb99c

3 files changed

Lines changed: 27 additions & 1 deletion

File tree

App/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ static async Task Main(string[] args)
4141
var createdUnityProject = await _untiyCli.CreateUnityProject(_project);
4242
if(createdUnityProject) await _untiyCli.OpenUnityProject(_project);
4343
if(createdUnityProject) Output.WriteSuccessWithTick("Complete");
44+
45+
if(createdUnityProject) _project.OpenProjectDirectory();
4446
}
4547

4648
private static bool DisplayHelp()

App/Project/QuickStartProject.cs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using UnityQuickStart.App.IO;
1+
using System.Diagnostics;
2+
using System.Runtime.InteropServices;
3+
using UnityQuickStart.App.IO;
24
using UnityQuickStart.App.Settings;
35

46
namespace UnityQuickStart.App.Project
@@ -129,5 +131,21 @@ public async Task SetProjectPath()
129131
Directory.SetCurrentDirectory(projectPath);
130132
Output.WriteSuccessWithTick($"Ok project path set: {projectPath}");
131133
}
134+
135+
public void OpenProjectDirectory()
136+
{
137+
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
138+
{
139+
Process.Start("explorer.exe", ProjectPath);
140+
}
141+
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
142+
{
143+
Process.Start("open", ProjectPath);
144+
}
145+
else
146+
{
147+
Console.WriteLine("Unsupported OS");
148+
}
149+
}
132150
}
133151
}

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ unityquick [options]
7272
unityquick -p "C:\Program Files\Unity\Hub\Editor"
7373
```
7474

75+
76+
https://github.com/PaulNonatomic/UnityQuickStartCli/assets/4581647/6147804f-edf1-4548-8b46-555aa074e24b
77+
78+
79+
80+
7581
## Code Structure
7682

7783
- [`Git.cs`](https://github.com/PaulNonatomic/UnityQuickStartCli/blob/develop/App/Git/Git.cs): Handles Git-related functionalities.

0 commit comments

Comments
 (0)