Google.Android.AppBundle.Editor.AssetPackConfig

Configuration for all asset packs that will be packaged in an Android App Bundle.

Summary

Public attributes

AssetPacks = new Dictionary()
readonly Dictionary< string, AssetPack >
Dictionary from asset pack name to AssetPack object containing info such as delivery mode.
DefaultTextureCompressionFormat = TextureCompressionFormat.Default
When asset packs for multiple texture compression formats are present, this specifies the format used when building standalone APKs for Android pre-Lollipop devices.

Properties

DeliveredAssetPacks
Dictionary< string, AssetPack >
A dictionary containing the subset of AssetPacks that are marked for delivery.

Public functions

AddAssetBundle(string assetBundleFilePath, AssetPackDeliveryMode deliveryMode)
void
Package the specified AssetBundle file in its own AssetPack with the specified delivery mode.
AddAssetBundles(IDictionary< TextureCompressionFormat, string > compressionFormatToAssetBundleFilePath, AssetPackDeliveryMode deliveryMode)
void
Package the specified AssetBundle files, which vary only by TextureCompressionFormat, in an AssetPack with the specified delivery mode.
AddAssetsFolder(string assetPackName, string assetsFolderPath, AssetPackDeliveryMode deliveryMode)
void
Package all raw assets in the specified folder in an AssetPack with the specified name and using the specified delivery mode.
AddAssetsFolders(string assetPackName, IDictionary< TextureCompressionFormat, string > compressionFormatToAssetPackDirectoryPath, AssetPackDeliveryMode deliveryMode)
void
Package the specified raw assets in the specified folders, keyed by TextureCompressionFormat, in an AssetPack with the specified delivery mode.

Public attributes

AssetPacks

readonly Dictionary< string, AssetPack > AssetPacks = new Dictionary<string, AssetPack>()

Dictionary from asset pack name to AssetPack object containing info such as delivery mode.

Note: asset pack names must start with a letter and can contain only letters, numbers, and underscores. Note: convenience methods such as AddAssetBundle are recommended to more safely add new Asset packs, but this dictionary is available for direct modification for advanced use cases.

DefaultTextureCompressionFormat

TextureCompressionFormat DefaultTextureCompressionFormat = TextureCompressionFormat.Default

When asset packs for multiple texture compression formats are present, this specifies the format used when building standalone APKs for Android pre-Lollipop devices.

Properties

DeliveredAssetPacks

Dictionary< string, AssetPack > DeliveredAssetPacks

A dictionary containing the subset of AssetPacks that are marked for delivery.

Public functions

AddAssetBundle

void AddAssetBundle(
  string assetBundleFilePath,
  AssetPackDeliveryMode deliveryMode
)

Package the specified AssetBundle file in its own AssetPack with the specified delivery mode.

The name of the created asset pack will match that of the specified AssetBundle file.

Details
Parameters
assetBundleFilePath
The path to a single AssetBundle file.
deliveryMode
The AssetPackDeliveryMode for the asset pack.
Exceptions
ArgumentException
If the asset pack name is invalid.
FileNotFoundException
If the AssetBundle file doesn't exist.

AddAssetBundles

void AddAssetBundles(
  IDictionary< TextureCompressionFormat, string > compressionFormatToAssetBundleFilePath,
  AssetPackDeliveryMode deliveryMode
)

Package the specified AssetBundle files, which vary only by TextureCompressionFormat, in an AssetPack with the specified delivery mode.

When using Play Asset Delivery APIs, only the AssetBundle for the device's preferred texture compression format will be delivered.

Details
Parameters
compressionFormatToAssetBundleFilePath
A dictionary from TextureCompressionFormat to AssetBundle files.
deliveryMode
The AssetPackDeliveryMode for the asset pack.
Exceptions
ArgumentException
If the dictionary or asset pack name is invalid.
FileNotFoundException
If any AssetBundle file doesn't exist.

AddAssetsFolder

void AddAssetsFolder(
  string assetPackName,
  string assetsFolderPath,
  AssetPackDeliveryMode deliveryMode
)

Package all raw assets in the specified folder in an AssetPack with the specified name and using the specified delivery mode.

Details
Parameters
assetPackName
The name of the asset pack.
assetsFolderPath
The path to a directory whose files will be directly copied into the asset pack during app bundle creation.
deliveryMode
The AssetPackDeliveryMode for the asset pack.
Exceptions
ArgumentException
If the assetPackName is invalid.
FileNotFoundException
If the assetsFolderPath doesn't exist.

AddAssetsFolders

void AddAssetsFolders(
  string assetPackName,
  IDictionary< TextureCompressionFormat, string > compressionFormatToAssetPackDirectoryPath,
  AssetPackDeliveryMode deliveryMode
)

Package the specified raw assets in the specified folders, keyed by TextureCompressionFormat, in an AssetPack with the specified delivery mode.

When using Play Asset Delivery APIs, only the folder for the device's preferred texture compression format will be delivered.

Details
Parameters
assetPackName
The name of the asset pack.
compressionFormatToAssetPackDirectoryPath
A dictionary from TextureCompressionFormat to the path of directories of files that will be directly copied into the asset pack during app bundle creation.
deliveryMode
The AssetPackDeliveryMode for the asset pack.
Exceptions
ArgumentException
If the dictionary or asset pack name is invalid.