Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: kicki2k on May 18, 2012, 03:13:25 PM
-
hi,
i have a question.
How do I change the Sprite UV.
Please see the attached file.
-
Select the atlas, choose your sprite, modify its rectangle.
-
thanks quick reply.
i do not want change sprite's rectangle in atlas.
i want change sprite's rectangle in UISprite code.
Because it uses the same sprites, UISprite want to apply differently for each rectangle.
-
Well, that's not how UISprite works. You can't change it on the sprite, only in the atlas.
-
Depending on how flexible you need to be with the UV coordinates, one compromise might be to set up multiple sprites in the atlas that point to overlapping rectangles and cycle through the sprites as needed. Or if you only have a few instances of UISprite that you need to change, set up a separate entry in the atlas for each one so you can change the rectangle for one without affecting the others.
-
ok, i understand.
UISprite class can't change the ractangle.
UISprite class only draw fixed ractangle.
Only in the atlas is to add another name sprite rectangle.
thanks.