- Home /
Is it possible to move relative position of GUI?
Hi i am making a sort of HUD layer by using OnGUI function for Android. However, there are lots of devices having different resolution. So I need to re-position controls in hud layer because OnGUI draws 2D things. I came up with re-position controls with adjusting rate of screen size like this. ex> GUI.Button(new Rect(Screen.width posx, Screen.height posY, Screen.width sizex, Screen.height sizeY); but it doesn't look good. their positions are not what I expected.
So, I tried another way to use drawing sprites with ortho camera. But in this case, i have to make a customized button.
I don't know how to do this.(I had only 2 weeks experience with Unity.
Anyone have a good idea? Thanks.
I solved the problem. here's link. http://www.41post.com/3816/program$$anonymous$$g/unity-scaling-the-gui-based-on-the-screen-resolution