Google.Android.AppBundle.Editor.Bundletool

Helper to build Android App Bundle files suitable for publishing on Google Play Console.

Summary

Public static functions

BuildApks(string aabFilePath, string apksFilePath, BundletoolBuildMode buildMode, bool enableLocalTesting)
string
Builds an APK Set (.apks) file from the specified Android App Bundle file (.aab).
BuildBundle(BuildPlayerOptions buildPlayerOptions, AssetPackConfig assetPackConfig)
bool
Builds an Android App Bundle using the specified build options.

Public static functions

BuildApks

string BuildApks(
  string aabFilePath,
  string apksFilePath,
  BundletoolBuildMode buildMode,
  bool enableLocalTesting
)

Builds an APK Set (.apks) file from the specified Android App Bundle file (.aab).

Details
Parameters
aabFilePath
An .aab file that was created by calling BuildBundle.
apksFilePath
An .apks output ZIP file containing APK files.
buildMode
The type of APKs to build from the Android App Bundle.
enableLocalTesting
If true, enables a testing mode where fast-follow and on-demand asset packs are fetched from storage rather than downloaded.
Returns
An error message if there was a problem running bundletool, or null if successful.

BuildBundle

bool BuildBundle(
  BuildPlayerOptions buildPlayerOptions,
  AssetPackConfig assetPackConfig
)

Builds an Android App Bundle using the specified build options.

Before calling this method use PlayInstantBuildSettings.SetInstantBuildType() to decide whether to build an instant app bundle or a regular app bundle for installed apps.

Details
Parameters
buildPlayerOptions
A Unity BuildPlayerOptions including the output file path.
assetPackConfig
The asset packs to include in the Android App Bundle, if any.
Returns
True if the build succeeded, false if it failed or was cancelled.