Regular API function

simCloseScene / sim.closeScene

Description Closes current scene, and switches to another open scene. If there is no other open scene, a new scene is then created. Can only be called from an add-on, or from the sanbox script, when called from Lua. See also sim.loadScene and sim.saveScene.
C/C++
synopsis
simInt simCloseScene()
C/C++
parameters
C/C++
return value
-1 if operation was not successful, otherwise the current scene index.
Lua
synopsis
int result=sim.closeScene()
Lua
parameters
Lua
return values
Similar to the C-function counterpart
Python
synopsis
int result=sim.closeScene()

<