While setting up my own party creation scene in unity I noticed that some of my GUIs would move out of place if I changed to aspect ratio of the screen. How do I keep this from happening, I know it has to do with Screen.width, and Height, but even if I use those, and try to altr postions from them, it still does not work.... thanks in advance :) everyone that has helped me this far is awesom!!
asked Jul 02 '11 at 05:34 AM
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.
To use it effectively, you need to set the scale of the GUI Texture's Transform to (0, 0, 0). Now, the Pixel Inset is in full control of the texture's size and you can set the Pixel Inset values to be the exact pixel size of your Texture.
answered Jul 02 '11 at 08:27 PM
Graham Dunnett ♦♦
This happens to me all the time... I'm not sure that there is much you can do about it, all I do is make the editor screen as big as possible, and then put my GUI elements in when the screen is at the size that it would be if the game was built.
Also, feel free to build your game and see where it is in relation to where you put it in the editor....
Hope this helps
answered Jul 02 '11 at 02:03 PM