GetAssetPackStateAsync
Queries the state of Android asset packs.
Read time 1 minuteLast updated 8 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Android
- Assembly: UnityEngine.AndroidJNIModule
GetAssetPackStateAsync(string[], Action<ulong, AndroidAssetPackState[]>)
Queries the state of Android asset packs.
public static void GetAssetPackStateAsync(string[] assetPackNames, Action<ulong, AndroidAssetPackState[]> callback)
Parameters
The array of names of the Android asset packs to query the state of.
The callback method to get the result. Unity raises this callback once when the query is complete and the callback receives the state of queried Android asset packs. The callback method must have two parameters:
- A ulong type parameter which indicates the total size of the queried asset packs.
- An array of AndroidAssetPackState which contains the state of each queried asset pack.
Remarks
This method directly wraps Google's PlayCore plug-in API. If the PlayCore plug-in is missing, calling this method throws an .
InvalidOperationExceptionAdditional Resources: AndroidAssetPackState, AndroidAssetPacks.DownloadAssetPackAsync, AndroidAssetPacks.GetAssetPackPath.
GetAssetPackStateAsync(string[])
Queries the state of Android asset packs.
public static GetAssetPackStateAsyncOperation GetAssetPackStateAsync(string[] assetPackNames)
Parameters
The array of names of the Android asset packs to query the state of.
Returns
Type | Description |
|---|---|
| GetAssetPackStateAsyncOperation | An object that represents the query 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 API. If the PlayCore plug-in is missing, calling this method throws an .
InvalidOperationExceptionAdditional Resources: GetAssetPackStateAsyncOperation, AndroidAssetPacks.DownloadAssetPackAsync, AndroidAssetPacks.GetAssetPackPath.