Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / setPrefabAssetUrlResolver

Function: setPrefabAssetUrlResolver() ​

ts
function setPrefabAssetUrlResolver(resolver): void;

Defined in: prefab/spawnPrefab.ts:21

Override how prefab asset URLs (the file URL itself AND every asset URL stored inside prefab files) are resolved before fetching. Published/preview runtimes register a resolver that maps the editor's localasset://…/assets/x URLs to ./assets/x; the editor leaves it unset (identity — the localasset:// protocol is fetchable there). Same pattern as setDracoDecoderPath. Pass null to restore identity.

Parameters ​

ParameterType
resolver((url) => string) | null

Returns ​

void