How can i control a GUI Texture?

How can i control a GUI Texture Position?

There should always be in the upper left corner, no matter what size has the browser window.

thanks

Let's say you created a `GUI Texture` from the menu (`GameObject->Create Other->GUI Texture`).

This will create a `UnityWatermark-small` texture on the center of your screen. In order to change the position and put it in the upper left corner, you have to do 2 things, but first select the object and in the Inspector:

  1. Change the `Transform.Position` to `(0, 1, 0)`
  2. From the `GUITexture` component change the `Pixel Inset` to:
    • `X = 0`
    • `Y = -58`

And you will get what you want.

Just remember that no matter how big is the resolution of your game is, the `(0, 0, 0)` position of your `GUITexture` is the lower left corner, `(1, 1, 0)` is the upper right corner and the Z value is used if you have overlapping textures.

As for the Pixel Inset (directly taken from Unity's Manual):

The purpose of the Pixel Inset is to prevent textures from scaling with screen resolution, and keeping thim in a fixed pixel size. This allows you to render a texture without any scaling. This means that players who run your game in higher resolutions will see your textures in smaller areas of the screen, allowing them to have more screen real-estate for your gameplay graphics.

More details can be found in Reference Manual for `GUI Texture`.

If i use this:

  1. Change the Transform.Position to (0, 1, 0)
  2. From the GUITexture component change the Pixel Inset to: * X = 0 * Y = -58

is on lower left corner, not the the upper left corner! are you sure? this is the richt dimensions?

Good! but where can I find the (option) Transform.Position?