Engine API Reference - v2.23.0-beta.17
    Preparing search index...

    Type Alias LoadAssetCallback<K>

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

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

    Type Parameters

    Type Declaration

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

        • err: string | null

          The error message is null if no errors were encountered.

        • Optionalasset: Asset<K>

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

        Returns void