Skip to content

SCENE_FORMAT_VERSION

const SCENE_FORMAT_VERSION: 4 = 4

Defined in: scene/scene.ts:356

Current scene format version — bump by one per migration step below.

An integer, not semver: this number only has to answer “older, current, or newer”, and dotted ones cannot. parseFloat sorts “1.10” below “1.2”.

2: Light2D and Mesh2D renamed to Light and MeshRenderer. An engine from before the rename reads the new names as components it has never heard of and drops them, which is a scene that loads and has no lights — so it must refuse the file instead, and the version is what tells it to. 3: the flat physics components took the 2D suffix the 3D ones already had (RigidBodyRigidBody2D, the four colliders, CharacterController). Same reasoning as 2, and worse here: an older engine drops the bodies and loads a level whose floor nothing collides with. 4: the flat joints took the 3D set’s words, which are also the industry’s (RevoluteJoint2DHingeJoint2D, prismatic → slider, weld → fixed). Same reasoning again: dropped joints load a machine whose parts fall apart.