- Home /
Question by
SEVO · Jun 12, 2013 at 02:52 PM ·
guitexture
How do you make guiTextures update their position upon a screen orientation change?
Hi Community, Hope this is the right place to post this.
I use a C# script to initialise the position of a gui image to the bottom right corner of my screen.
transform.position = Vector3.zero; transform.localScale = Vector3.zero; guiTexture.pixelInset = new Rect(Screen.width- scaledWidth, 0, scaledWidth,scaledWidth);
This works great, but I also have a Screen.orientation change when the device is re-oriented. Upon an orientation the guiTexture remains at the same x position as previously, y position seems to work fine for now but I'm guessing it will cause an issue for a top right justified guiTexture.
I have tried using a guiTexture.pixelInset.Set(); in the update but it doesn't appear to be working :(
Cheers in advance
Comment