Hey guys,
I have a costum scene where I load planets for the solar system.
Every planet has 2 images. One for when the planet is not selected and one for selected.
The first time when the scene is loaded, everything loads correctly and all planet images are visible.
When I exit the scene and re-enter, they never appear again. No matter how many times I reload, until I quit the game.
This is what I know so far when they don't show:
- The planet sprites exist and have all the parameters as if there was an image (e.g. width, height, opacity, x, y)
- The image address remains the same and is shown correctly
- When I manually add a planet sprite through the console (e.g. "earth.png") it still won't show. But when I copy it and make a "earth2.png" it will show. Which tells me that planet png's once loaded, won't load anymore for whatever reason.
I can add any other non-planet image manually through the console in the game.
- It's not stuck on a loop that would prevent the images from showing
- It all started when I added the on-selection-images. Before that this problem never occured.
- Reserving the planet images works for the first time the scene is loaded, but not on re-entering the scene.
- The image cache has been expanded to hold 100 x 1000 x1000 pixels. The limit is not the issue I tested for 500 x 1000 x1000
- The Object structure is SceneManager._scene._planets[x]._selected and ._planets[x]._unselected. The planets are added as a child to the scene of course.
- The layering doesn't change and remains correct when scene is loaded and re-loaded.
My guess is that it has something to do with the cache failing to clear or for whatever reason is overloading.
Like I said, it all started when I added the extra on-selection-images. However, if that's the case I don't understand why it would load correctly on the first run and then fail on re-entering the scene.
Thankful for any ideas!
I have a costum scene where I load planets for the solar system.
Every planet has 2 images. One for when the planet is not selected and one for selected.
The first time when the scene is loaded, everything loads correctly and all planet images are visible.
When I exit the scene and re-enter, they never appear again. No matter how many times I reload, until I quit the game.
This is what I know so far when they don't show:
- The planet sprites exist and have all the parameters as if there was an image (e.g. width, height, opacity, x, y)
- The image address remains the same and is shown correctly
- When I manually add a planet sprite through the console (e.g. "earth.png") it still won't show. But when I copy it and make a "earth2.png" it will show. Which tells me that planet png's once loaded, won't load anymore for whatever reason.
I can add any other non-planet image manually through the console in the game.
- It's not stuck on a loop that would prevent the images from showing
- It all started when I added the on-selection-images. Before that this problem never occured.
- Reserving the planet images works for the first time the scene is loaded, but not on re-entering the scene.
- The image cache has been expanded to hold 100 x 1000 x1000 pixels. The limit is not the issue I tested for 500 x 1000 x1000
- The Object structure is SceneManager._scene._planets[x]._selected and ._planets[x]._unselected. The planets are added as a child to the scene of course.
- The layering doesn't change and remains correct when scene is loaded and re-loaded.
My guess is that it has something to do with the cache failing to clear or for whatever reason is overloading.
Like I said, it all started when I added the extra on-selection-images. However, if that's the case I don't understand why it would load correctly on the first run and then fail on re-entering the scene.
Thankful for any ideas!