Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
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‎

Lines changed: 6 additions & 1 deletion
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)

AltStyle によって変換されたページ (->オリジナル) /