How do I...

How do I make it so that my GUI textures stay in the top right/left no matter the pixel size. And in the middle on the top. because my problem is my screen on one of my computers is huge compared to the tiny resolution on my laptop. So when I play my game on the laptop you can see the health bar or instructions cause they are to high. So how do you make it so that your GUI textures are allays able to be seen. I need them to be on the top right… and the top middle. Thanks in advance.

1 Like

Try using the automatic layout function that unity has:

1 Like

Yes but this would not work in the setting that I have, becuase I am using a GUI texture, not the built in GUI system. So I am using my own picture. So is there a way to adda script that will put my GUI_Texture in the top right no matter the resolution?

GUITextures are positioned with view-relative coordinates, so <1,1> is top right regardless of the size of the screen. You can use the pixel inset property of the GUITexture component to shift the texture by a pixel offset (this effectively changes the “anchor point” of the texture that will be aligned with the view coordinate). If you set the GUITexture object’s view coordinates to <1,1> and offset by the width and height of the texture then it should appear exactly in the top right corner regardless of screen size.