@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / index / remapSnapshotEntityIds
Function: remapSnapshotEntityIds() ​
ts
function remapSnapshotEntityIds(
snapshot,
idMap,
options?): {
snapshot: SubtreeSnapshot;
warnings: ExternalRefWarning[];
};Defined in: prefab/snapshotIdUtils.ts:108
Return a deep-cloned snapshot with every entity id (entity list, entry keys, and all id-bearing component fields) remapped through idMap. References to ids missing from the map follow externalRefPolicy and are reported in warnings (with ids in the INPUT snapshot's id space).
Parameters ​
| Parameter | Type |
|---|---|
snapshot | SubtreeSnapshot |
idMap | Map<number, number> |
options? | RemapSnapshotOptions |
Returns ​
ts
{
snapshot: SubtreeSnapshot;
warnings: ExternalRefWarning[];
}| Name | Type | Defined in |
|---|---|---|
snapshot | SubtreeSnapshot | prefab/snapshotIdUtils.ts:112 |
warnings | ExternalRefWarning[] | prefab/snapshotIdUtils.ts:112 |

