Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

All my UI Disappears when I move a specific Button

Discussion in 'UGUI & TextMesh Pro' started by baazul, Jul 12, 2019.

  1. baazul

    baazul

    Joined:
    Jul 29, 2018
    Posts:
    42
    Hello,

    I am a beginner and started a little project to learn. In this project I have 12 buttons. Number 1 to 11 works fine but when I move number 12 the UI disappears in Game View...

    I made a Youtube video because I think it's way easier to understand.

    Left side is the scene view, middle is the game view, right side is the Hierarchy. As you can see in the video, moving button 1 and 2 works fine but moving button 12 to some places makes the whole UI disappear :/



    Do you know why ?

    Thank you
     
  2. baazul

    baazul

    Joined:
    Jul 29, 2018
    Posts:
    42
    I made various test and I can finally move the button 12 for unknown reasons... But there is definitely an issue with the way my UI is displayed. In case it helps, here is the Inspector of my background that seems to be overlapping with the UI:

    upload_2019-7-12_17-21-12.png

    If I set the "Pos Z" to 0 or if I set the "Sorting Layer" to Background, the UI disappear again (Probably behind the background ?)

    The sorting layer of the UI is "Story and Choices"
     
  3. baazul

    baazul

    Joined:
    Jul 29, 2018
    Posts:
    42
    Also just in case, here is the Canvas and Main Camera Inspector

    upload_2019-7-12_17-24-26.png

    upload_2019-7-12_17-24-43.png
     

    Attached Files:

  4. baazul

    baazul

    Joined:
    Jul 29, 2018
    Posts:
    42
    I made a new background image, replaced the old one and it solved the issue. I am not sure of the reason. Maybe because I had a 3D Material attached to a 2D background
     
  5. Backlogtopia

    Backlogtopia

    Joined:
    May 9, 2023
    Posts:
    1
    Bumping this. I have the same exact issue but can't figure out why. I have three buttons in the middle of my scene that I'm trying to move, but anytime I do, all of the buttons disappear. I've tried replacing the image as you said, but it doesn't seem to fix it.
     
  6. Hungry-Lion

    Hungry-Lion

    Joined:
    Sep 2, 2018
    Posts:
    22
    I moved all my UI elements under an empty game object and they "stopped" displaying. When I went to the individual images and buttons I found out that their scale was 0 on every axis, turned it back to 1 and they showed up.