CodeAndWeb / phaser2-sprite-sheet-example

Small example showing how to use TexturePacker with Phaser
22 stars 10 forks source link

Frame names require ".png" suffix #2

Open Engelberg opened 7 years ago

Engelberg commented 7 years ago

I am not getting the behavior described in the tutorial. This doesn't seem to work: game.add.sprite(0, 0, 'cityscene', 'background')

I'm needing to add .png like so: game.add.sprite(0, 0, 'cityscene', 'background.png')

Otherwise I get an invalid frame name error.

I'd prefer to not have to add the .png suffix everywhere. How do I get the behavior described in the tutorial?

teslamint commented 7 years ago

I also got the same problem, but I found the solution. You need go to 'Advance Settings' in the bottom of Settings tab, then check the 'Trim sprite names'. I think the tutorial should be updated.