Scene: restart

restart()
  • Restarts the current scene.
Sample Code

################## restart the current scene
 

# import bge
import bge

# get current scene
scene = bge.logic.getCurrentScene()

# restart the current scene
scene.restart()