Make my HUD full screen

Hello the title says it all. I have a GUITexture and it is transparent in the middle i am using as a HUD. It works fine, but is too small and also, if i build the game and run it on different PC with a different screen size, how can i auto adjust it to fit the screen. Please help, it is greatly appreciated :slight_smile:

You can use Screen.width and Screen.height to find the screen width and height.

And a PROTIP: Instead of defining controls in a hardcoded way like
Rect(10,10,50,50)
try the fluidly changeable Rect(screen.width*0.01,screen.height*0.01,screen.width*0.05,screen.height*0.05)

or even the GUILayout class (look in the script reference in [Menu]->[Help]->[Scripting Reference].

Lets say you position it at the center of a smaller screen. You set the x position as 550 and the y as 550. This is a better solution. Screen.width / 2 for the x and Screen.height / 2 for the y. You might want it a little altered depending on what you use it for. (Screen.width / 2) - 50 for x or something like that.

Hope it helps