Search Unity

Editor drawing UI elements correctly but WebGL and PC not drawing them as expected

Discussion in 'Editor & General Support' started by BrentMichie, Jun 26, 2017.

  1. BrentMichie

    BrentMichie

    Joined:
    Sep 10, 2014
    Posts:
    32
    Hi,
    I am using a few Buttons, a Label and Textfield in my opening scene. In the editor they render the buttons exactly as I expect. All scenes have the same buttons throughout. All the other scenes' buttons work like the editor version and look rather nice. However, the opening scene does not draw the buttons, label and textfield as expected. It barely draws them at all.
    Here are some screenshots and my code to see if anyone can help me:
    Script
    upload_2017-6-26_23-13-53.png
    Build
    upload_2017-6-26_23-14-10.png
    Editor
    upload_2017-6-26_23-15-22.png

    I have been searching and I cannot find a similar issue. It is so frustrating because all that appears on the screen initially is "Please enter your name below" and no box to type the name. You only get a cursor appearing once you click the space directly below the Labels text. Not intuitive for a user.

    As I said, this only occurs on the first scene of the game. All other scenes work exactly the same in the editor as they do in the final build.

    All help appreciated, Brent
     
  2. BrentMichie

    BrentMichie

    Joined:
    Sep 10, 2014
    Posts:
    32
    Have I posted this in the wrong forum?
     
  3. SpacebarGamestudio

    SpacebarGamestudio

    Joined:
    Jun 30, 2017
    Posts:
    18
  4. BrentMichie

    BrentMichie

    Joined:
    Sep 10, 2014
    Posts:
    32
  5. SpacebarGamestudio

    SpacebarGamestudio

    Joined:
    Jun 30, 2017
    Posts:
    18
    What attribute are your using for the UI scale mode
     
  6. BrentMichie

    BrentMichie

    Joined:
    Sep 10, 2014
    Posts:
    32
    This is not to do with scale. The GUI items do not appear only in the first scene. I appreciate you trying to answer but scale is not the issue.