# DownloadAssetPackAsync

> Downloads Android asset packs.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Android](/engine/6000.0/script-reference/unityengine/android.md)
* **Assembly:** UnityEngine.AndroidJNIModule

## DownloadAssetPackAsync(string\[], Action\<AndroidAssetPackInfo>)

Downloads Android asset packs.

```csharp
public static void DownloadAssetPackAsync(string[] assetPackNames, Action<AndroidAssetPackInfo> callback)
```

### Parameters

**** (\[string\[]]\(https\://learn.microsoft.com/dotnet/api/system.string)): The array of names of Android asset packs to download.**** (\[Action\<AndroidAssetPackInfo>]\(https\://learn.microsoft.com/dotnet/api/system.action)): The callback method to inform about download progress. It gets called multiple times for each asset pack during its download. The callback method must have a parameter of AndroidAssetPackInfo type. The default value is null.

### Remarks

This method directly wraps Google's [PlayCore plug-in](https://developer.android.com/guide/playcore) API. If the PlayCore plug-in is missing, calling this method throws an `InvalidOperationException`.

Additional Resources: [AndroidAssetPackInfo](/engine/6000.0/script-reference/unityengine/android/androidassetpackinfo.md), [AndroidAssetPacks.CancelAssetPackDownload](/engine/6000.0/script-reference/unityengine/android/androidassetpacks/cancelassetpackdownload.md), [AndroidAssetPacks.GetAssetPackPath](/engine/6000.0/script-reference/unityengine/android/androidassetpacks/getassetpackpath.md), [AndroidAssetPacks.GetAssetPackStateAsync](/engine/6000.0/script-reference/unityengine/android/androidassetpacks/getassetpackstateasync.md), [AndroidAssetPacks.RemoveAssetPack](/engine/6000.0/script-reference/unityengine/android/androidassetpacks/removeassetpack.md), [AndroidAssetPacks.RequestToUseMobileDataAsync](/engine/6000.0/script-reference/unityengine/android/androidassetpacks/requesttousemobiledataasync.md).

## DownloadAssetPackAsync(string\[])

Downloads Android asset packs to the device.

```csharp
public static DownloadAssetPackAsyncOperation DownloadAssetPackAsync(string[] assetPackNames)
```

### Parameters

**** (\[string\[]]\(https\://learn.microsoft.com/dotnet/api/system.string)): The array of names of Android asset packs to download.

### Returns

| Type                                                                                                                      | Description                                                                                                                                          |
| ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| [DownloadAssetPackAsyncOperation](/engine/6000.0/script-reference/unityengine/android/downloadassetpackasyncoperation.md) | An object that represents the download operation. If you yield this object inside a coroutine, the coroutine pauses until the operation is complete. |

### Remarks

This method directly wraps Google's [PlayCore plug-in](https://developer.android.com/guide/playcore) API. If the PlayCore plug-in is missing, calling this method throws an `InvalidOperationException`.

Additional Resources: [DownloadAssetPackAsyncOperation](/engine/6000.0/script-reference/unityengine/android/downloadassetpackasyncoperation.md), [AndroidAssetPackInfo](/engine/6000.0/script-reference/unityengine/android/androidassetpackinfo.md), [AndroidAssetPacks.CancelAssetPackDownload](/engine/6000.0/script-reference/unityengine/android/androidassetpacks/cancelassetpackdownload.md), [AndroidAssetPacks.GetAssetPackPath](/engine/6000.0/script-reference/unityengine/android/androidassetpacks/getassetpackpath.md), [AndroidAssetPacks.GetAssetPackStateAsync](/engine/6000.0/script-reference/unityengine/android/androidassetpacks/getassetpackstateasync.md), [AndroidAssetPacks.RemoveAssetPack](/engine/6000.0/script-reference/unityengine/android/androidassetpacks/removeassetpack.md), [AndroidAssetPacks.RequestToUseMobileDataAsync](/engine/6000.0/script-reference/unityengine/android/androidassetpacks/requesttousemobiledataasync.md).
