Engine API Reference - v2.24.0-beta.28
    Preparing search index...

    Type Alias LoadAssetCallback<Type>

    LoadAssetCallback: (err: string | null, asset?: Asset<Type>) => void

    Callback used by AssetRegistry#loadFromUrl and called when an asset is loaded (or an error occurs).

    Type Parameters

    • Type extends AssetType | string & {} = string

    Type Declaration

      • (err: string | null, asset?: Asset<Type>): void
      • Parameters

        • err: string | null

          The error message is null if no errors were encountered.

        • Optionalasset: Asset<Type>

          The loaded asset if no errors were encountered. Its type follows the type passed to AssetRegistry#loadFromUrl.

        Returns void