Search Unity

OnGui element same position as guiTexure.

Discussion in 'Scripting' started by zhapness, Sep 3, 2011.

  1. zhapness

    zhapness

    Joined:
    Apr 10, 2011
    Posts:
    58
    Hi
    Is it posible to have a GUI.TextField, be in the same position and have the same size as a guiTexture in the scene?
    I have tried

    var usernamefield : GUITexure;

    GUI.TextField (usernameField.GetScreenRect(), username );

    but it does not work it is waay of the GUITextures position

    ...

    I know i can just use Rect(Screen.width/x,Screen.height/x,Screen.width/x,Screen.height/x)

    But I found that hard to work with...

    Any idias?