@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / index / loadPrefab
Function: loadPrefab() ​
ts
function loadPrefab(url): Promise<PrefabAsset>;Defined in: prefab/spawnPrefab.ts:61
Fetch + parse (and cache) a .prefab asset. All strings inside the snapshot are passed through the registered URL resolver, so asset references load correctly in published/preview builds. Use this from preloaders to warm the same cache spawnPrefab reads.
Parameters ​
| Parameter | Type |
|---|---|
url | string |
Returns ​
Promise<PrefabAsset>

