Last active
December 4, 2022 07:33
-
-
Save GeorgiyRyaposov/f3742e9715255ceb27fe5039a7df57b5 to your computer and use it in GitHub Desktop.
Put into 'Editor' folder and add 'CloudBuildHelper.PreExport' class name in unity cloud build to pre export setting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CloudBuildHelper | |
{ | |
#if UNITY_CLOUD_BUILD | |
public static void PreExport(UnityEngine.CloudBuild.BuildManifestObject manifest) | |
{ | |
var buildNumber = "unknown"; | |
manifest.TryGetValue("buildNumber", out buildNumber); | |
UnityEditor.PlayerSettings.bundleVersion = string.Format("1.0.{0}", buildNumber); | |
} | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note to self: don't forget to include
using UnityEditor;
at the top of this file