Why is this UI image completely black? And why can I see the editor grid lines through it?
I just starting working with uGUI and I’m thoroughly confused. Things sometimes look wildly different depending on if I open the prefab from the asset section of the project window, open it from the hierarchy window, or if the wind in Kansas scares a groundhog back into its hole.
At a glance, you have set the UI image’s colour to be completely black.
Thanks. Setting the color to white seems to have fixed the issue with the image being all black, but it’s still semi-transparent, as I can still see the grid lines behind it. Any ideas?
Turn off the grid then. ![]()
The grid is always drawn on top in the scene view.
Ah, I had no idea. Well, then I guess everything is okay! Thanks all!
You’re always gonna have all kinds of horrible things happen if you set ANY PART of your scale to zero.
Just… don’t do that.
The proper way to set scales:
NEVER set scale (or any part of scale) to zero or negative.
NEVER use Vector2 because that makes the third term (Z) zero.
ALWAYS use Vector3, and make sure that the .z is either 1.0f, or else your non-zero scale.
Similarly never set scale to Vector3.zero, especially in a UI, because this will cause layout divide-by-zeros and damage all your hierarchy.
Thank you!

