Phaser Editor adding a sprite

Recommended Posts

Hi all,

I'm feeling pretty dense here, I'm just having a play with Phaser Editor and I'm running in to some issues.

I can't seem to add a Prefab Sprite or a Group to the main canvas.

So I'm creating a sprite via New > Sprite Prefab File (lets say it called MySprite), I drag MySprite from the assets panel on to the Main canvas.

When I run in the browser the console just come up with "Reference Error: MySprite is not defined"

Am I missing something here?

Thanks for looking!

Share this post

Link to post
Share on other sites



I think the problem you have is that you should load the MyScript.js file into the game. You can do it with a script tag in the index.html file (as you do in any website), or by adding a script asset to the assets-pack.json file.


Tell me if it works for you.



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

  • Recently Browsing   0 members

    No registered users viewing this page.