MCPcopy Create free account
hub / github.com/esengine/esengine / deserialize

Method deserialize

packages/core/src/ECS/Scene.ts:1354–1356  ·  view source on GitHub ↗

* 反序列化场景 * * 从序列化数据恢复场景状态 * * @param saveData 序列化的数据(JSON字符串或二进制Uint8Array) * @param options 反序列化选项 * * @example * ```typescript * // 从JSON恢复(自动从ComponentRegistry获取组件类型) * scene.deserialize(jsonData, { * strategy: 'replace' * }); *

(saveData: string | Uint8Array, options?: SceneDeserializationOptions)

Source from the content-addressed store, hash-verified

1352 * ```
1353 */
1354 public deserialize(saveData: string | Uint8Array, options?: SceneDeserializationOptions): void {
1355 SceneSerializer.deserialize(this, saveData, options);
1356 }
1357
1358 /** 增量序列化的基础快照 */
1359 private _incrementalBaseSnapshot?: unknown;

Callers

nothing calls this directly

Calls 1

deserializeMethod · 0.65

Tested by

no test coverage detected