Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Keyjin on June 16, 2014, 03:43:04 PM
-
Hey guys,
i have the problem, when i scale an object down it moves out of the "UISprite" Box Size.
(http://up.picr.de/18638851if.jpg)
Thanks :)!
Cheers,
Keyjin
-
Your sprite size is 970, but you've shrunk it down to 0.1% of that, or less than a pixel in size. What for? Keep the scale at (1, 1, 1).
-
Ok. I made a script to scale the Objects to the given Screen Format.
Example. From 10:16 to 2:3
GmObj
.transform.localScale = new Vector3
(GmObj
.transform.localScale.x * (2 / 10), GmObj
.transform.localScale.y * (3 / 16), GmObj
.transform.localScale.z);
How can i scale to the needed format ? Need that for Mobile Devices!
-
Bad idea. You're skewing the sprite. Skewing the UI is a terrible idea as it makes everything look ugly and blurry.
Don't do it. Use the options on the UIRoot. It has a "Shrink Portrait UI" option.
-
Oh Thank you :)! Works perfect !!
Is it possible to set the Max Width for "Shrink Portrait UI"? Because i want to make it for mobile and PC.
Edit: Solved.... Must read more the documentation ... sry for the stupid question!