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

Commit 36e68d8

Browse files
committed
Adding support for loading a project's version from a ProjectVersionOverride.txt file in the root directory
1 parent 5ff3947 commit 36e68d8

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)