Skip to content

Commit

Permalink
Backporting 2020 fix for recent update
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDarksideJ committed May 6, 2024
1 parent 44de74a commit b4fa650
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Editor/Utilities/AssemblyDefinitionPostprocessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ private void OnPreprocessAsset()

if (packageVersion.Contains("-pre."))
{
#if UNITY_2021_1_OR_NEWER
packageVersion = packageVersion[..packageVersion.IndexOf("-", StringComparison.Ordinal)];
#else
packageVersion = packageVersion.Substring(0, packageVersion.IndexOf("-", StringComparison.Ordinal));
#endif
}

var newVersion = $"[assembly: AssemblyVersion(\"{packageVersion}\")]";
Expand Down

0 comments on commit b4fa650

Please sign in to comment.