- Home /
Right constrained scalable GUITexture
Hi folks,
I have a GUITexture(a logo) that I want to right constrain to the top-right corner of the screen. I also need it to scale.
The constraining part is the easy part, but when I resize the screen it scales from the bottom left corner of the GUITexture not from the right.
I guess what I'm asking is how can I change it to scale from the top right and not from the bottom left? I can make it scale from the center by using the code below but its not the desired result I'm looking for because the logo would extend too far on the right on bigger resolutions and too far on the left on smaller.
guiTexture.pixelInset.x = -newWidth/2;
guiTexture.pixelInset.y = -newHeight/2;
Hope that makes sense, thanks!
Your answer
Follow this Question
Related Questions
Why different resolutions makes the camera area change? 0 Answers
Unity 5.3 canvas scaling - Android 2 Answers
Mobile 2d Game Resolution scalling 0 Answers
IOS Resolution Scaling 0 Answers
Scaling a GUI image 1 Answer