From 36e68d8cfa31a08079c2ce01265dbc10caf98c27 Mon Sep 17 00:00:00 2001 From: Kyle Orth Date: Thu, 5 Apr 2018 04:22:21 +1000 Subject: [PATCH] Adding support for loading a project's version from a ProjectVersionOverride.txt file in the root directory --- UnityLauncher/Tools.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/UnityLauncher/Tools.cs b/UnityLauncher/Tools.cs index 9310842..0c8dec8 100644 --- a/UnityLauncher/Tools.cs +++ b/UnityLauncher/Tools.cs @@ -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