Phaser API Documentation

  Version: 
init([data])

Description:

The PluginManager calls this method on a Global Plugin when the plugin is first instantiated. It will never be called again on this instance. In here you can set-up whatever you need for this plugin to run. If a plugin is set to automatically start then BasePlugin.start will be called immediately after this. On a Scene Plugin, this method is never called. Use Phaser.Plugins.ScenePlugin#boot instead.

Parameters:

name type arguments description
data any <optional>

A value specified by the user, if any, from the data property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's install method (if started manually).

Examples:
Since: 3.8.0
Source: src/plugins/BasePlugin.js (Line 49)