Jump to content

No 'add' method in the plugins object


Recommended Posts

When I try to add a plugin to my game, I get this error:


`Uncaught TypeError: Cannot read property 'add' of undefined`


When I inspect the game object, the plugins attribute looks like this:


plugins: {

    _i: -1,

    _len: 0,

    game: Phaser.Game,

    plugins: Array[0]

    _proto_: Object



There is no 'add' method.

Link to comment
Share on other sites

Make sure you haven't accidentally overwritten the plugins object. Otherwise as you can see by looking at the source, all the methods are there and exposed (and have been for many versions now as we use plugins quite extensively in our client projects)

Link to comment
Share on other sites

  • 1 year later...

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...