Skip to content
This repository has been archived by the owner on May 19, 2021. It is now read-only.

Commit

Permalink
Merge pull request #57 from KyleOrth/project-version-override
Browse files Browse the repository at this point in the history
Allowing override of Project Version with a text file
  • Loading branch information
unitycoder authored Apr 6, 2018
2 parents 5ff3947 + 36e68d8 commit a392d06
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion UnityLauncher/Tools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,12 @@ public static void AddContextMenuRegistry(string contextRegRoot)
public static string GetProjectVersion(string path)
{
var version = "";
if (Directory.Exists(Path.Combine(path, "ProjectSettings")))

if(File.Exists(Path.Combine(path, "ProjectVersionOverride.txt")))
{
version = File.ReadAllText(Path.Combine(path, "ProjectVersionOverride.txt"));
}
else if (Directory.Exists(Path.Combine(path, "ProjectSettings")))
{
var versionPath = Path.Combine(path, "ProjectSettings", "ProjectVersion.txt");
if (File.Exists(versionPath) == true) // 5.x and later
Expand Down

0 comments on commit a392d06

Please sign in to comment.