# Google.Android.AppBundle.Editor.Bundletool

Helper to build [Android App Bundle](https://developer.android.com/platform/technology/app-bundle/) files suitable for publishing on [Google Play Console](https://play.google.com/apps/publish/).

## Summary

| ### Public static functions ||
|---|---|
| `https://developer.android.com/reference/unity/class/Google/Android/AppBundle/Editor/Bundletool#classGoogle_1_1Android_1_1AppBundle_1_1Editor_1_1Bundletool_1a8340551c41263eb8c8d4f9fca31c19d0(string aabFilePath, string apksFilePath, https://developer.android.com/reference/unity/namespace/Google/Android/AppBundle/Editor#namespaceGoogle_1_1Android_1_1AppBundle_1_1Editor_1aeae80497fe4b43b0ed5e0522e5a48585 buildMode, bool enableLocalTesting)` | `string` Builds an APK Set (.apks) file from the specified [Android](https://developer.android.com/reference/unity/namespace/Google/Android#namespaceGoogle_1_1Android) App Bundle file (.aab). |
| `https://developer.android.com/reference/unity/class/Google/Android/AppBundle/Editor/Bundletool#classGoogle_1_1Android_1_1AppBundle_1_1Editor_1_1Bundletool_1a419f1884fceff86fad1175c0546b85e8(BuildPlayerOptions buildPlayerOptions, https://developer.android.com/reference/unity/class/Google/Android/AppBundle/Editor/AssetPackConfig#classGoogle_1_1Android_1_1AppBundle_1_1Editor_1_1AssetPackConfig assetPackConfig)` | `bool` Builds an [Android](https://developer.android.com/reference/unity/namespace/Google/Android#namespaceGoogle_1_1Android) App Bundle using the specified build options. |

## Public static functions

### BuildApks

```c#
string BuildApks(
  string aabFilePath,
  string apksFilePath,
  BundletoolBuildMode buildMode,
  bool enableLocalTesting
)
```
Builds an APK Set (.apks) file from the specified [Android](https://developer.android.com/reference/unity/namespace/Google/Android#namespaceGoogle_1_1Android) App Bundle file (.aab).

<br />

Details Parameters `aabFilePath` An .aab file that was created by calling [BuildBundle](https://developer.android.com/reference/unity/class/Google/Android/AppBundle/Editor/Bundletool#classGoogle_1_1Android_1_1AppBundle_1_1Editor_1_1Bundletool_1a419f1884fceff86fad1175c0546b85e8). `apksFilePath` An .apks output ZIP file containing APK files. `buildMode` The type of APKs to build from the [Android](https://developer.android.com/reference/unity/namespace/Google/Android#namespaceGoogle_1_1Android) 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

```c#
bool BuildBundle(
  BuildPlayerOptions buildPlayerOptions,
  AssetPackConfig assetPackConfig
)
```
Builds an [Android](https://developer.android.com/reference/unity/namespace/Google/Android#namespaceGoogle_1_1Android) 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.

<br />

Details Parameters `buildPlayerOptions` A Unity BuildPlayerOptions including the output file path. `assetPackConfig` The asset packs to include in the [Android](https://developer.android.com/reference/unity/namespace/Google/Android#namespaceGoogle_1_1Android) App Bundle, if any. **Returns** True if the build succeeded, false if it failed or was cancelled.