phaser2-sprite-sheet-example icon indicating copy to clipboard operation
phaser2-sprite-sheet-example copied to clipboard

Frame names require ".png" suffix

Open Engelberg opened this issue 8 years ago • 1 comments

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?

Engelberg avatar Jun 18 '17 00:06 Engelberg

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.

teslamint avatar Nov 13 '17 02:11 teslamint