F
getByName
Finds an asset by its name and type, initializing the module that registers it if needed.
function getByName<T extends AssetType = "png">(name: AssetName<T>, type?: T): UnboundAsset | undefinedParameters
| Name | Type | Description |
|---|---|---|
| name | AssetName<T> | The asset name to match. |
| type? | T | The asset type to match, |
Returns
UnboundAsset | undefinedThe matched UnboundAsset, or undefined if none match.