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

Commit a392d06

Browse files
authored
Merge pull request #57 from KyleOrth/project-version-override
Allowing override of Project Version with a text file
2 parents 5ff3947 + 36e68d8 commit a392d06

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

UnityLauncher/Tools.cs

+6-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,12 @@ public static void AddContextMenuRegistry(string contextRegRoot)
251251
public static string GetProjectVersion(string path)
252252
{
253253
var version = "";
254-
if (Directory.Exists(Path.Combine(path, "ProjectSettings")))
254+
255+
if(File.Exists(Path.Combine(path, "ProjectVersionOverride.txt")))
256+
{
257+
version = File.ReadAllText(Path.Combine(path, "ProjectVersionOverride.txt"));
258+
}
259+
else if (Directory.Exists(Path.Combine(path, "ProjectSettings")))
255260
{
256261
var versionPath = Path.Combine(path, "ProjectSettings", "ProjectVersion.txt");
257262
if (File.Exists(versionPath) == true) // 5.x and later

0 commit comments

Comments
 (0)