MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / migratePrefabData

Function migratePrefabData

src/world/version.ts:34–47  ·  view source on GitHub ↗
(raw: PrefabData)

Source from the content-addressed store, hash-verified

32}
33
34export function migratePrefabData(raw: PrefabData): PrefabData {
35 const from = raw.schemaVersion | 0;
36
37 if (from === WORLD_SCHEMA_VERSION) {
38 return raw;
39 }
40
41 if (from > WORLD_SCHEMA_VERSION) {
42 return raw;
43 }
44
45 raw.schemaVersion = WORLD_SCHEMA_VERSION;
46 return raw;
47}

Callers 1

loadPrefabFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected