Search Unity

Bug: Moving a UI element into a canvas that has never been enabled makes it permanently invisible.

Discussion in 'UGUI & TextMesh Pro' started by Peeling, Mar 20, 2019.

  1. Peeling

    Peeling

    Joined:
    Nov 10, 2013
    Posts:
    443
    To work around various issues I'm having, I'm moving UI elements from canvas to canvas, and sometimes into a 'hidden' canvas: one where the Canvas component is not ticked.

    The problem is that when I move those objects out again into an active canvas, they won't render. If I have a scene window open and select the broken object, its handles appear in the right place, but the object itself is invisible in both the scene and game view.

    Anything that starts in the 'hidden' canvas on launch will also never render when moved to an active canvas.

    The problem can be worked around by having the canvas enabled for a frame at launch, and then disabling it. After that, objects can be moved in and out of that hidden canvas safely.
     
    spartanPip likes this.