跳转到内容

migratePrefabData

此内容尚不支持你的语言。

migratePrefabData(raw): MigrationResult

Defined in: prefab/migrate.ts:31

Upgrade a parsed .esprefab JSON value to the current format.

The historical format used numeric entity ids; current format uses opaque strings (UUIDs for editor-authored prefabs). Numeric ids are stringified with String(n) so cross-references — parent, children, rootEntityId, PrefabOverride.prefabEntityId, nestedPrefab.overrides — remain consistent.

The function is total: it accepts already-migrated data and returns it with migrated: false. Throws on shapes that can’t be reconciled.

unknown

MigrationResult