Search Unity

GUI Max Size

Discussion in 'Immediate Mode GUI (IMGUI)' started by prankard, Mar 24, 2010.

  1. prankard

    prankard

    Joined:
    Mar 24, 2010
    Posts:
    19
    Hey, I'm trying to make a 720p application and I'm having problems with the size of my GUI Box.

    This is the very simple test code that I'm using:
    Code (csharp):
    1. var myTexture:Texture2D;
    2. var blankGUIStyle:GUIStyle;
    3.  
    4. function Update()
    5. {
    6. }
    7.  
    8. function OnGUI()
    9. {
    10.     GUI.Box(new Rect(0,0,1280,720), myTexture, blankGUIStyle);
    11. }
    myTexture is linked to a 1280x720 file in my assets.

    However, when I view the box, it is actually around 1025x575. Is there a max limit on the GUI?
    I've managed to get it working by slicing the image into 4 sections and adding 4 boxes however it's not practical as on the fastest setting you get aliasing glitches when you can see the seams of the image joined together.

    Is there something I'm missing, I didn't see a max GUI size in any scripting reference docs.

    Many thanks,

    James
     
  2. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
  3. prankard

    prankard

    Joined:
    Mar 24, 2010
    Posts:
    19
    Works a charm :D
    Thanks for the help!