Hi! I have a canvas and some UI texts inside it. The problem is that they are only visible when I set their position to center of the screen. When I change it to top or any corner, they become invisible. It’s quite interesting that it only happens with one canvas. The other one works properly. Both are set to “Screen Space - Camera”. There’s also another problem. I use these UI texts as player’s HUD. I don’t know why, but when they’re set to “Screen Space - Overlay” they don’t keep their position while player is moving. I had to set them to “Screen Space - Camera” to solve the problem, but now every 3D object can cover them… Can You help me?
Exactly, Unity is FULL OF BUGS like this, EVERYTIME, and you can’t know why, you need to rebuild again and again, and to pray that another bug will not happend (which will happend anyway…). It’s my 100th bug you know, and i feel very angry now, what a WASTE OF TIME !!!
I had similar problem while moving object from outside of Canvas into the Canvas.
Scale was changing to 0 while parenting.
To fix that you need to set “worldPositionStays” to false while parenting.
uiObject.transform.SetParent(canvas, false);
At least it helped me.
Ps: I hate this retarded way of formatting text, that we have here.
Try to set Canvas to “Constant Screen Size” and use a default size (I normaly use 1366X768), also check the anchors of your GUI elements
I tried to set Canvas to ,Scale with screen size", because there was no option “Constant Screen Size” . It didn’t help ;/
[79433-beztytułu.png|79433]
Use LTS version if you dont. Some variables in your project files may be corrupt, store your assets folder in your project and save a preset for your tag & layers settings and save values like this after use presets to reset, then create a new project, make sure all packages are updated, and move your stored assets folder to your newly created project