跳转到内容

serializeScene

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

serializeScene(world, sceneName?): SceneData

Defined in: scene.ts:614

Walks the live world and produces a SceneData that round-trips through loadSceneData. Editors call this on save; external tools (prefab extract, diff, CLI export) can reuse the same primitive.

Parent/child links are collapsed into the entity record’s parent+children fields; the Parent and Children components themselves are omitted from the components array so loadSceneData’s setParent pass is the single source of truth for hierarchy.

World

string = 'scene'

SceneData