Welcome,
Guest
. Please
login
or
register
.
December 03, 2024, 10:25:36 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
[Solved]Scaling UISprites failed
« previous
next »
Print
Pages: [
1
]
Author
Topic: [Solved]Scaling UISprites failed (Read 2077 times)
Keyjin
Newbie
Thank You
-Given: 3
-Receive: 0
Posts: 6
[Solved]Scaling UISprites failed
«
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.
Thanks
!
Cheers,
Keyjin
«
Last Edit: June 17, 2014, 04:08:53 PM by Keyjin
»
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Scaling UISprites failed
«
Reply #1 on:
June 17, 2014, 12:56:29 PM »
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).
Logged
Keyjin
Newbie
Thank You
-Given: 3
-Receive: 0
Posts: 6
Re: Scaling UISprites failed
«
Reply #2 on:
June 17, 2014, 01:32:00 PM »
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!
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Scaling UISprites failed
«
Reply #3 on:
June 17, 2014, 02:12:35 PM »
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.
Logged
Keyjin
Newbie
Thank You
-Given: 3
-Receive: 0
Posts: 6
Re: Scaling UISprites failed
«
Reply #4 on:
June 17, 2014, 02:27:28 PM »
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!
«
Last Edit: June 17, 2014, 04:08:32 PM by Keyjin
»
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
[Solved]Scaling UISprites failed