We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9261160 commit f00c525Copy full SHA for f00c525
1 file changed
src/core/PluginManager.js
@@ -103,6 +103,13 @@ Phaser.PluginManager.prototype = {
103
}
104
105
this._pluginsLength = this.plugins.push(plugin);
106
+
107
+ // Allows plugins to run potentially destructive code outside of the constructor, and only if being added to the PluginManager
108
+ if (typeof plugin['init'] === 'function')
109
+ {
110
+ plugin.init();
111
+ }
112
113
return plugin;
114
115
else
0 commit comments