Skip to content

Commit 070d823

Browse files
author
Michael Meier
committed
Initial Commit
1 parent af126c7 commit 070d823

File tree

7 files changed

+78
-0
lines changed

7 files changed

+78
-0
lines changed

Images/UnityPlayerIcon.png

3.55 KB
Loading

Images/unityplayer16.ico

1.12 KB
Binary file not shown.

Images/unityplayer64.ico

17.7 KB
Binary file not shown.

UnityProjectLauncher/Program.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System.IO;
2+
using System.Diagnostics;
3+
4+
namespace UnityProjectLauncher
5+
{
6+
class Program
7+
{
8+
static void Main()
9+
{
10+
if (Directory.Exists(@".\Assets"))
11+
{
12+
string[] paths = Directory.GetFiles(@".\Assets", "*.unity", SearchOption.AllDirectories);
13+
if(paths.Length > 0)
14+
{
15+
ProcessStartInfo processStartInfo = new ProcessStartInfo(paths[0]);
16+
processStartInfo.UseShellExecute = true;
17+
Process.Start(processStartInfo);
18+
}
19+
else
20+
{
21+
File.AppendAllLines("LauncherLog.txt", new string[]{ "Error: Could not find a scene file. Make sure your project does have a scene file within the Assets or one of its subfolders!"});
22+
}
23+
}
24+
else
25+
{
26+
File.AppendAllLines("LauncherLog.txt", new string[] { "Error: Could not find a scene file because there was no Asset folder present. Make sure this Executable is placed in a Unity Project Folder (Not inside the Asset folder)!" });
27+
}
28+
}
29+
}
30+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>WinExe</OutputType>
5+
<TargetFramework>netcoreapp3.1</TargetFramework>
6+
<ApplicationIcon>unityplayer64.ico</ApplicationIcon>
7+
<Authors>Michael Meier</Authors>
8+
<Company>Meier-Digital</Company>
9+
<Description>Simple helper executable which allows you to open your Unity Project from its main folder.</Description>
10+
<Copyright>Michael Meier / All rights regarding the Unity Icon remain with Unity Technologies - Its soley used for ease of use.</Copyright>
11+
<PackageProjectUrl>https://www.meier-digital.com</PackageProjectUrl>
12+
<PackageIcon>UnityPlayerIcon.png</PackageIcon>
13+
<SignAssembly>true</SignAssembly>
14+
</PropertyGroup>
15+
16+
<ItemGroup>
17+
<None Include="..\Images\UnityPlayerIcon.png">
18+
<Pack>True</Pack>
19+
<PackagePath></PackagePath>
20+
</None>
21+
</ItemGroup>
22+
23+
</Project>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30907.101
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityProjectLauncher", "UnityProjectLauncher.csproj", "{9B38CDE5-117B-441D-A704-235DD7E5464A}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{9B38CDE5-117B-441D-A704-235DD7E5464A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{9B38CDE5-117B-441D-A704-235DD7E5464A}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{9B38CDE5-117B-441D-A704-235DD7E5464A}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{9B38CDE5-117B-441D-A704-235DD7E5464A}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {98F18354-77E1-495B-BFA9-A65FD7C5ADE7}
24+
EndGlobalSection
25+
EndGlobal
17.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)