- Home /
Canvas elements disappear with scale change
When I change the scale of an image on the canvas, it disappears for some reason, but only if I change it through code or by erasing the current scale and setting a new one. If I set it to a two digit number and erase the last digit, it works (???).
It know it sounds confusing, so here's a video of the problem: https://youtu.be/tmagv6icbqw
Thanks for being willing to help me :D
Answer by superjustin5000 · Mar 18 at 11:31 PM
@nowonn Have you found a solution for this? I'm having the exact same issue right now.
Nope, unfortunately, I haven't :( I solved the problem in the game though, but it was something else causing it not to show up, I think I was moving it back the Z axis by accident? But not the problem in the editor, I just got used to it.
Just figured it out. The Canvas component had "pixel perfect" checked. After unchecking it, all of the problems are gone. It was also screwing with the positioning of some of my Text elements as well. Wondering if that's the same in your case.
Your answer
![](https://koobas.hobune.stream/wayback/20220613034604im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Why did some of the canvas element disappear after build&run the game 2 Answers
unity2d text UI is appearing above my loading prefab 0 Answers
Unity Android Screen Glitch 1 Answer
Text mesh not showing on a world space canvas attached to a enemy gameobject, 2D 0 Answers
How to turn on Raycast Target on Drag? 0 Answers