resetWorldTo
此内容尚不支持你的语言。
resetWorldTo(
world,sceneData):Map<number,number>
Defined in: scene.ts:435
Reset the world to a previously-captured scene: despawn every current entity,
then reload sceneData. Used for editor play-state isolation (snapshot before
Play via serializeScene, restore on Stop), level restart, etc. Because
loadSceneData no longer mutates its input, the same snapshot can be
restored repeatedly. Entity ids change; the returned map is
snapshot-id → new entity for callers that need to remap references/selection.
Parameters
Section titled “Parameters”sceneData
Section titled “sceneData”Returns
Section titled “Returns”Map<number, number>