PhaserEditor
PhaserEditor copied to clipboard
Scene editor: generates invalid variable's name.
Version
- Phaser Editor Version:3.10.2
- Operating system:Windows 10
Description
I've added a large image to the scene, when I launch the game it works fine
But once I set the scale of this image to 0.3 (both, X and Y) and then launch the game again I get a grey screen and nothing happens.
I'm new to this tool and Phaser overall so getting stuck at the first step (a simple image addition) is very frustrating. How can I see if there are any compilation errors in the editor? I've opened up a developer console inside Phaser editor and this is what I get each time I save my scene:
Thanks
Possible solution
Perhaps it doesn't run properly because it's running in the built-in game player, how could I run this project in browser?
Found the problem...it's quite funny actually. The name of the image is 1218 and so in generated code I get
Since 1218 is an integer it's trying to declare that integer as object
Hi @Marchiuzzz
Those errors shown on the console are fixed for the next version of the editor.
I'm glad you found the problem with the image. I will re-open this issue and rename it to "Scene Editor compiler: generate invalid JS idenfifiers".
@PhaserEditor2D I was bitten by this when I added my first test image as well (from my Photos dir, the first place I could think of to find an image to import as a test, so it was a numeric name)!