Preparing search index...

    A handle for the metadata of an asset.

    // Get an asset by either finding an already imported one, or importing it.
    export function findOrCreate(assetManager, absolutePath) {
    let meta = assetManager.findImportedCopy(absolutePath);
    if (meta) {
    return meta.primaryAsset;
    }

    meta = assetManager.importExternalFile(absolutePath);
    return meta.primaryAsset;
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    assets: Editor.Assets.Asset[]

    A list of all the available assets this handle contains.

    assetTreePath: SourcePath

    Source path of this asset within the asset tree.

    compressionSettings: AssetCompressionSettings
    id: Uuid

    The unique id of the entity.

    isPackedPackageItem: boolean

    Indicates whether this item is packed inside a native package.

    meta: Meta

    Metadata associated with this entity, providing access to its unique identifier and other descriptive properties.

    nativePackageDescriptor: NativePackageDescriptor

    Descriptor identifying the native package associated with this import metadata.

    nativePackageRoot: Editor.Model.AssetImportMetadata

    Root AssetImportMetadata entry of the native package containing this item.

    primaryAsset: Editor.Assets.Asset

    The primary asset of this handle. Usually, this is the asset you will assign after accessing an asset.

    sourcePath: Path

    The source file where the asset was imported from.

    topmostNativePackageRoot: Editor.Model.AssetImportMetadata

    Topmost root AssetImportMetadata in the native package hierarchy.

    type: string

    The entity's type.

    Methods

    • Retrieves a string value from the extra data store by key.

      Parameters

      • key: string

      Returns string

    • Returns the name of this object's type.

      Returns string

    • Returns true if the object is of the specified type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object refers to the same instance as the given object.

      Parameters

      Returns boolean

    • Stores a string value in the extra data store under the given key.

      Parameters

      • key: string
      • value: string

      Returns void

    • Returns the static metadata descriptor for the AssetImportMetadata type.

      Returns Meta