Closed JinZSu closed 3 years ago
Hi, I think you have to load the image inside the preload function and not in init. And the file needs to be inside the public folder.
I have fixed the issue! Thank you!
The problem is that the path directory for ion-phaser begins in public so all I had to do was 'assets/logo.png'
Hello,
I have reasons to believe that image.load doesn't actually work.
I have made a testing script and have pasted it below. The ion-Phaser will not render the photo correctly, but instead give a black and green default.
The files are like this: -React-app --node_modules/ --Public/ --src/ ---App.tsx ---Gamescreen.tsx ---assets/ ----logo.png
I have tried multiple variations such as: ./assets/logo.png logo.png (moved the image to the same folder as app.tsx) public/assets/logo.png (moved the image and folder into public)
It just doesn't want to render