Sign in to follow this  

How do you pass data to another scene?

Recommended Posts

I found that you could use this.scene.start('Scene2', {Level : 2, 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?



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.