Class AddressableAssetEntry | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class AddressableAssetEntry

    Contains data for an addressable asset entry.

    Inheritance
    System.Object
    AddressableAssetEntry
    Namespace: UnityEditor.AddressableAssets.Settings
    Syntax
    [Serializable]
    public class AddressableAssetEntry : ISerializationCallbackReceiver

    Properties

    address

    The address of the entry. This is treated as the primary key in the ResourceManager system.

    Declaration
    public string address { get; set; }
    Property Value
    Type Description
    System.String

    AssetPath

    The path of the asset.

    Declaration
    public string AssetPath { get; }
    Property Value
    Type Description
    System.String

    guid

    The asset guid.

    Declaration
    public string guid { get; }
    Property Value
    Type Description
    System.String

    IsInResources

    Is the asset in a resource folder.

    Declaration
    public bool IsInResources { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsInSceneList

    Is scene in scene list.

    Declaration
    public bool IsInSceneList { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsScene

    Is this entry for a scene.

    Declaration
    public bool IsScene { get; }
    Property Value
    Type Description
    System.Boolean

    IsSubAsset

    Is a sub asset. For example an asset in an addressable folder.

    Declaration
    public bool IsSubAsset { get; set; }
    Property Value
    Type Description
    System.Boolean

    labels

    The set of labels for this entry. There is no inherent limit to the number of labels.

    Declaration
    public HashSet<string> labels { get; }
    Property Value
    Type Description
    HashSet<System.String>

    parentGroup

    The asset group that this entry belongs to. An entry can only belong to a single group at a time.

    Declaration
    public AddressableAssetGroup parentGroup { get; set; }
    Property Value
    Type Description
    AddressableAssetGroup

    ReadOnly

    Read only state of the entry.

    Declaration
    public bool ReadOnly { get; set; }
    Property Value
    Type Description
    System.Boolean

    Methods

    CreateCatalogEntries(List<ContentCatalogDataEntry>, Boolean, String, IEnumerable<Object>, Object)

    Declaration
    public void CreateCatalogEntries(List<ContentCatalogDataEntry> entries, bool isBundled, string providerType, IEnumerable<object> deps, object extraData)
    Parameters
    Type Name Description
    System.Collections.Generic.List<ContentCatalogDataEntry> entries
    System.Boolean isBundled
    System.String providerType
    System.Collections.Generic.IEnumerable<System.Object> deps
    System.Object extraData

    CreateKeyList()

    Creates a list of keys that can be used to load this entry.

    Declaration
    public List<object> CreateKeyList()
    Returns
    Type Description
    System.Collections.Generic.List<System.Object>

    The list of keys. This will contain the address, the guid as a Hash128 if valid, all assigned labels, and the scene index if applicable.

    GatherAllAssets(List<AddressableAssetEntry>, Boolean, Boolean, Func<AddressableAssetEntry, Boolean>)

    Declaration
    public void GatherAllAssets(List<AddressableAssetEntry> assets, bool includeSelf, bool recurseAll, Func<AddressableAssetEntry, bool> entryFilter = null)
    Parameters
    Type Name Description
    System.Collections.Generic.List<AddressableAssetEntry> assets
    System.Boolean includeSelf
    System.Boolean recurseAll
    System.Func<AddressableAssetEntry, System.Boolean> entryFilter

    GetAssetLoadPath(Boolean)

    The asset load path. This is used to determine the internal id of resource locations.

    Declaration
    public string GetAssetLoadPath(bool isBundled)
    Parameters
    Type Name Description
    System.Boolean isBundled

    True if the asset will be contained in an asset bundle.

    Returns
    Type Description
    System.String

    Return the runtime path that should be used to load this entry.

    OnAfterDeserialize()

    Implementation of ISerializationCallbackReceiver. Converts data from serializable form after deserialization.

    Declaration
    public void OnAfterDeserialize()

    OnBeforeSerialize()

    Implementation of ISerializationCallbackReceiver. Converts data to serializable form before serialization.

    Declaration
    public void OnBeforeSerialize()

    SetAddress(String, Boolean)

    Set the address of the entry.

    Declaration
    public void SetAddress(string addr, bool postEvent = true)
    Parameters
    Type Name Description
    System.String addr

    The address.

    System.Boolean postEvent

    Post modification event.

    SetLabel(String, Boolean, Boolean, Boolean)

    Set or unset a label on this entry.

    Declaration
    public bool SetLabel(string label, bool enable, bool force = false, bool postEvent = true)
    Parameters
    Type Name Description
    System.String label

    The label name.

    System.Boolean enable

    Setting to true will add the label, false will remove it.

    System.Boolean force

    When enable is true, setting force to true will force the label to exist on the parent AddressableAssetSettings object if it does not already.

    System.Boolean postEvent

    Post modification event.

    Returns
    Type Description
    System.Boolean
    Back to top Copyright © 2019 Unity Technologies
    Generated by DocFX