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

Allowing override of Project Version with a text file #57

Merged
merged 1 commit into from
Apr 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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