Problem with Canvas not updating

In the image, I have a selection bar that should be getting reset when the menu is disabled (basically it should go back to being under “Resume” like the white text is). OnDisable() is used to reset the position, but when the menu is enabled again the selection bar doesn’t reset even though Unity even shows that it’s showing in the right place (the outline that’s around Resume is where the selection bar should be).

I’ve tried Canvas.ForceUpdateCanvases() to no avail, and I’ve found that moving the bar in the editor causes it to update correctly. Anything I’m doing wrong?

I don’t understand exactly what you need.

You want to show/dontshow the canvas. What you need to enable = true/false is the Canvas

Canvas CanvasToShowOrNot;

void Start()
CanvasToShowOrNot= GameObject.Find("MenuCanvas").GetComponent<Canvas>();

Then activate/desactivate when you want

CanvasToShowOrNot.enabled = true;

CanvasToShowOrNot.enabled = false;

This helps? Give more info writing: @tormentoarmagedoom

Bye! :smiley: