I have a unity3D project and I want to build to android target. But how to specific the 'Export Project' flag in command line argument? Anyone knows?
My build script:
BuildPlayerOptions buildPlayerOptions = new BuildPlayerOptions();
buildPlayerOptions.scenes = scenes;
buildPlayerOptions.locationPathName = "AndroidBuild";
buildPlayerOptions.target = BuildTarget.Android;
buildPlayerOptions.options = BuildOptions.None;
BuildPipeline.BuildPlayer(buildPlayerOptions);
CodePudding user response:
If you want to update Export Project
option in Player Settings
you will have to set BuildOptions
with AcceptExternalModificationsToPlayer
. You can find more information here: Documentation.
There is also way to update this using UnityEditor
settings:
EditorUserBuildSettings.exportAsGoogleAndroidProject = true;