API

Renaming a scene

Renaming a Scene

To rename a scene, just go to the Assets Browser panel and rename the scene file by double-clicking its name.

Once accepted, the following folders will be renamed:

  • workspacePath/projects/oldname -> workspacePath/projects/newname
  • workspacePath/scenes/oldname -> workspacePath/scenes/newname

Scene names must be unique. If the folders already exist (in other words, if the scene already exists), then the operation is aborted.

Renaming paths in loaders in sources

Paths to scenes loaded in the code must also be updated.

For example:

const rootUrl = "./scenes/oldName/";
AppendSceneAsync(rootUrl + "scene.babylon", this.scene, () => {
// ...
});

should be updated to:

const rootUrl = "./scenes/newName/";
AppendSceneAsync(rootUrl + "scene.babylon", this.scene, () => {
// ...
});