I have a game with several scenes, all loaded using addressables:
- A persistent scene that stays loaded with things like the main camera and certain common game systems.
- A lobby scene
- A game scene
- There's also a non-addressable scene that loads in the persistent scene.
The game loads the non-addressable scene which then loads the persistent scene, which then additively loads the lobby scene. The lobby scene then loads the game scene (when the user clicks something).
Lobby loads the game scene in additively, and then is unloaded.
The game scene has a world UI in it with several UI Image components. There are no sprites set, so they are a solid color. If I load directly into the game, those UI Images remain the expected solid color.
Problem: If I follow the typical game flow and load Non-Addressable-Scene->Persistent → Lobby → Game, then the UI Images don’t show up anymore unless I set a sprite in them. The camera from Persistent is automatically set on the canvas so that’s not an issue. Has anyone seen this before and figured out the issue? Is it a Unity 6 bug?
We got a real problem here, folks. Somebody save me.
-
\$\begingroup\$ Just to get it right, you have nothing set in the sprite and want the default color displayed for the area of the sprite? If you need a solid sprite there, why not just set one? \$\endgroup\$Zibelas– Zibelas2024年11月16日 14:18:14 +00:00Commented Nov 16, 2024 at 14:18
-
\$\begingroup\$ Yep, you got it! I could do that, but it also seems like something's wrong and I'd like to fix it. I'll definitely do that if it comes down to it. \$\endgroup\$Programmer9000– Programmer90002024年11月16日 18:59:42 +00:00Commented Nov 16, 2024 at 18:59
-
\$\begingroup\$ I would say it is correct behaviour. It shows you the solid color to remind you that you forgot to set a sprite, not that it will show always the solid color when you don't set one. You could use a really small image and set it to stretch fill out to get the solid color back \$\endgroup\$Zibelas– Zibelas2024年11月17日 06:11:37 +00:00Commented Nov 17, 2024 at 6:11
-
\$\begingroup\$ Oh sorry, I think there's been some confusion. Nothing is showing up. I would like the solid colors to show up, but they are not. \$\endgroup\$Programmer9000– Programmer90002024年11月18日 01:58:10 +00:00Commented Nov 18, 2024 at 1:58