Skip to content

can not reinitialize after destroy becauseof plugin #50

Open
@Sinanaltundag

Description

@Sinanaltundag

I try with a simple example like in this repo, there is not a problem but in my project I use grid-engine plugin, and when I try to initialize after destroy gameRef, this 2 errors occured.

Scene Plugin key in use: GridEngine 
    at ReactComponent (http://localhost:3000/static/js/bundle.js:1437:7)
    at IonPhaser
    at header
    at div
    at IonEx (http://localhost:3000/static/js/bundle.js:409:64)
    at div
    at App
Uncaught TypeError: Cannot read properties of undefined (reading 'create')
    at MainScene.create (ionexample.jsx:50:1)
    at SceneManager.create (phaser.js:84684:1)
    at SceneManager.loadComplete (phaser.js:84615:1)
    at LoaderPlugin.emit (phaser.js:1671:1)
    at LoaderPlugin.loadComplete (phaser.js:165337:1)
    at LoaderPlugin.fileProcessComplete (phaser.js:165311:1)
    at SpriteSheetFile.onProcessComplete (phaser.js:4290:1)
    at data.onload (phaser.js:16548:1)

second error at this line
this.gridEngine.create(cloudCityTilemap, gridEngineConfig);
how can I reinitialize my game after destroy it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions