Quantcast
Channel: Questions in topic: "build"
Viewing all articles
Browse latest Browse all 4084

BuildPipeline.BuildPlayer with AAB

$
0
0
I've tried moving the EditorUserBuildSettings round a bit, and settled on the IPreprocessBuildWithReport route, but not sure how necessary that is, rather than just adding it to the start of BuildAll Anyway, either way, when I build manually using the menu, I get my AAB as expected, but when using this build command, it produces a folder called test.aab, containing a gradle android studio project - what am I doing wrong here - I just want the same behaviour as doing it manually from the menu. Any help would be appreciated! class BuildStepEnableBundle : IPreprocessBuildWithReport { public int callbackOrder { get { return 0; } } public void OnPreprocessBuild(BuildReport report) { EditorUserBuildSettings.androidBuildSystem = AndroidBuildSystem.Gradle; EditorUserBuildSettings.buildAppBundle = true; } } public class BuildAll { [MenuItem("Game/Build/Build All")] static void Build() { PlayerSettings.SetScriptingBackend(BuildTargetGroup.Android, ScriptingImplementation.IL2CPP); BuildPipeline.BuildPlayer(scenes, "Build/Android/test.aab", BuildTarget.Android, BuildOptions.CompressWithLz4HC); } }

Viewing all articles
Browse latest Browse all 4084

Trending Articles