Jump to content

How do I clear all game object in Phaser3? (or clear world)


KevinYen
 Share

Recommended Posts

Thanks a lot. sharks

I found one way to keep gameobject across another scenes.

gameObject.ignoreDestroy = true;

and when you go across another scene, you need to setup displayList.

this.sys.displayList.add(gameObject);

If I want to clear all game objects, just shutdown this scene. (start another scene or restart) (if gameObject.ignoreDestroy == false)

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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