Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AndroidAssetPacks

Provides methods for handling Android asset packs.
Read time 1 minuteLast updated 7 days ago

Definition

public static class AndroidAssetPacks

Remarks

Methods in this class are either direct wrappers of java APIs in Google's PlayCore plugin, or depend on values that the PlayCore API returns. Therefore to use it, the gradle project must include the "com.google.android.play:core" dependency. If your project contains custom asset packs or you enable Split Application Binary in Player Settings, Unity automatically adds this dependency to the unityLibrary submodule's build.gradle file. If the PlayCore plugin is missing, calling any wrapper throws an InvalidOperationException exception. Note that PlayCore APIs only work with fast-follow and on-demand delivery type asset packs, therefore methods in this class have the same limitation.

Static Properties

Property

Description

coreUnityAssetPacksDownloadedChecks if all core Unity asset packs are downloaded.

Static Methods

Method

Description

CancelAssetPackDownloadCancels Android asset pack downloads.
DownloadAssetPackAsyncDownloads Android asset packs to the device.
GetAssetPackPathGets the full path to the location where the device stores the assets for the Android asset pack.
GetAssetPackStateAsyncQueries the state of Android asset packs.
GetCoreUnityAssetPackNamesGets the names of the core Unity asset packs built for this application that use the fast-follow or on-demand delivery type.
RemoveAssetPackRemoves the specified Android asset pack from the device.
RequestToUseMobileDataAsyncRequests to use mobile data to download Android asset packs.