Skip to content

@modoki/engine / index / invalidatePrefab

Function: invalidatePrefab()

invalidatePrefab(prefabRef): void

Evict a prefab from the runtime cache so the next acquire re-fetches it from disk. Ownership (prefabOwners) is left intact — the scene still holds the prefab; we only force a fresh read. Called by the editor after it writes a .prefab.json (apply-to-prefab, save-as-prefab) so a subsequent scene load picks up the new file instead of a stale cached copy. Mirrors invalidateModel / invalidateMaterial. Accepts guid or path.

Parameters

prefabRef

string

Returns

void

Built with Modoki.