Version: 2021.2
LanguageEnglish
  • C#

AndroidAssetPacks.GetAssetPackStateAsync

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static Android.GetAssetPackStateAsyncOperation GetAssetPackStateAsync(string[] assetPackNames);

Parameters

assetPackNames The array of names of the Android asset packs to query the state of.

Returns

GetAssetPackStateAsyncOperation Returns an object that represents the query operation. If you yield this object inside a coroutine, the coroutine pauses until the operation is complete.

Description

Queries the state of Android asset packs.

This method directly wraps Google's PlayCore plugin API. If the PlayCore plugin is missing, calling this method throws an InvalidOperationException exception. See Also: GetAssetPackStateAsyncOperation, AndroidAssetPacks.DownloadAssetPackAsync, AndroidAssetPacks.GetAssetPackPath.


Declaration

public static void GetAssetPackStateAsync(string[] assetPackNames, Action<ulong,AndroidAssetPackState[]> callback);

Parameters

assetPackNames The array of names of the Android asset packs to query the state of.
callback 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.

Description

Queries the state of Android asset packs.

This method directly wraps Google's PlayCore plugin API. If the PlayCore plugin is missing, calling this method throws an InvalidOperationException exception. See Also: AndroidAssetPackState, AndroidAssetPacks.DownloadAssetPackAsync, AndroidAssetPacks.GetAssetPackPath.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961