Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Button issues on web build

Discussion in 'Immediate Mode GUI (IMGUI)' started by vs1234, Sep 26, 2015.

  1. vs1234

    vs1234

    Joined:
    Jan 7, 2015
    Posts:
    3
    I have been creating builds for Android & iOS that use buttons with rounded corners via GUILayout.Button calls. When I use one of those same png files to create a GUILayout.button for a web build the button becomes distorted. The border of the button is stretched out horizontally and vertically to be way thicker than the border is in the png file. Also the corners are not stretched out proportionately. In the original png file, the border is just a couple of pixels wide and the corners are nicely rounded. Why is it behaving so differently on the web build? How do I fix it?
     

    Attached Files:

  2. vs1234

    vs1234

    Joined:
    Jan 7, 2015
    Posts:
    3
    Additional info - I'm importing the png file as GUI/Legacy GUI and the png file proportions are the same as the displayed button's proportions. On the mobile builds I have seen that when the proportions are quite different there is distortion, but nothing like I'm seeing here.