Jump to content

How do you pass data to another scene?


Polska296
 Share

Recommended Posts

I found that you could use this.scene.start('Scene2', {Level : 2, Health : this.hero.health}) to pass data to another scene. However the next step I see in every example online is what confuses me which uses init in the next scene to get the data. Any time I use init, I get an error saying either init or data is not defines. Would someone be able to show me an example of passing the data to another scene and then logging the data in the console when moving to the new scene?

 

 

Link to comment
Share on other sites

  • 7 months later...
  • 8 months later...
 Share

  • Recently Browsing   0 members

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