Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Enabling Canvas takes 1 frame to rearrange all panels causing a visual glitch - will this be fixed?

Discussion in 'UGUI & TextMesh Pro' started by Revolter, Dec 21, 2014.

  1. Revolter

    Revolter

    Joined:
    Mar 15, 2014
    Posts:
    216
    I created all popups in my game using separate canvases, and even if I place the panel outside the screen, it shows it during the first frame when enabling the canvas, and then positions it on the correct coordinates. This creates an unpleasant visual glitch.

    Shall I rebuild all the popups in one canvas or will this be fixed in future updates?

    Edit: Might also be an issue of the animator, taking 1 frame to awake and switch to first frame
     
    Last edited: Dec 21, 2014
  2. Sbizz

    Sbizz

    Joined:
    Oct 2, 2014
    Posts:
    250
    Show us your animator scheme.

    I suppose you have "Open" and "Close" states. You have to create an empty state (make it as "Default state") with a transition to the "Open" state. In this way, your animator will start with the "Empty" state (no animation). Your popups should be hidden. Otherwise, the transition of the "Empty" state should be linked to the "Close" state.
     
    Senshi likes this.
  3. Revolter

    Revolter

    Joined:
    Mar 15, 2014
    Posts:
    216
    You're totally right! Thanks, I can't believe I didn't think of it ) I actually made a script that enables the popup at the animation start.