Class CustomAssetPackSettings
Stores information (name and delivery type) for all custom asset packs.
Inherited Members
Namespace: UnityEditor .AddressableAssets .Android
Assembly: Unity.Addressables.Android.Editor.dll
Syntax
public class CustomAssetPackSettings : ScriptableObject
Properties
CustomAssetPacks
Store all custom asset pack information.
Declaration
public List<CustomAssetPackEditorInfo> CustomAssetPacks { get; }
Property Value
Type | Description |
---|---|
List<Custom |
SettingsExists
Returns true if CustomAssetPackSettings asset exists.
Declaration
public static bool SettingsExists { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
AddAssetPack(string, DeliveryType)
Creates a new asset pack using name and delivery type.
Declaration
public void AddAssetPack(string assetPackName, DeliveryType deliveryType)
Parameters
Type | Name | Description |
---|---|---|
string | assetPackName | New asset pack name. |
Delivery |
deliveryType | Delivery type for the new asset pack. |
Remarks
If the new name is invalid (contains non alphanumeric, underscore characters, or doesn't start with a letter), asset pack is not created. If the new name already exists, new unique name is generated by adding numeric postfix.
GetSettings(bool)
Returns CustomAssetPackSettings asset.
Declaration
public static CustomAssetPackSettings GetSettings(bool create)
Parameters
Type | Name | Description |
---|---|---|
bool | create | Force creating CustomAssetPackSettings asset if it doesn't exist. |
Returns
Type | Description |
---|---|
Custom |
CustomAssetPackSettings asset. |
RemoveAssetPack(string)
Removes custom asset pack.
Declaration
public void RemoveAssetPack(string assetPackName)
Parameters
Type | Name | Description |
---|---|---|
string | assetPackName | Asset pack name to remove. |
Remarks
If asset pack with assetPackName doesn't exist, this method does nothing.
SetAssetPackName(string, string)
Change asset pack name for the custom asset pack.
Declaration
public void SetAssetPackName(string assetPackName, string newAssetPackName)
Parameters
Type | Name | Description |
---|---|---|
string | assetPackName | Asset pack name which should be changed. |
string | newAssetPackName | New asset pack name. |
Remarks
If asset pack with assetPackName doesn't exist, this method does nothing. If new name is invalid (contains non alphanumeric+underscore characters, or doesn't start with a letter) name is not changed. If new name already exists new unique name is generated by adding numeric postfix.
SetDeliveryType(string, DeliveryType)
Change delivery type for the custom asset pack.
Declaration
public void SetDeliveryType(string assetPackName, DeliveryType deliveryType)
Parameters
Type | Name | Description |
---|---|---|
string | assetPackName | Asset pack name. |
Delivery |
deliveryType | New delivery type. |
Remarks
If asset pack with assetPackName doesn't exist, this method does nothing.