Skip to content

Instantly share code, notes, and snippets.

@GeorgiyRyaposov
Last active December 4, 2022 07:33
Show Gist options
  • Save GeorgiyRyaposov/f3742e9715255ceb27fe5039a7df57b5 to your computer and use it in GitHub Desktop.
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
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
}
@j1mmie
Copy link

j1mmie commented Dec 4, 2022

Note to self: don't forget to include using UnityEditor; at the top of this file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment