Phaser API Documentation

  Version: 
run(key, [data])

Description:

Runs the given Scene, but does not change the state of this Scene.

This will happen at the next Scene Manager update, not immediately.

If the given Scene is paused, it will resume it. If sleeping, it will wake it. If not running at all, it will be started.

Use this if you wish to open a modal Scene by calling pause on the current Scene, then run on the modal Scene.

Parameters:

name type arguments description
key string | Phaser.Scene

The Scene to run.

data object <optional>

A data object that will be passed to the Scene and emitted in its ready, wake, or resume events.

Returns:
Description:

This Scene Plugin instance.

Since: 3.10.0
Source: src/scene/ScenePlugin.js (Line 479)