Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Warka0OO on September 04, 2013, 10:47:20 AM

Title: Pivot and UISprite
Post by: Warka0OO on September 04, 2013, 10:47:20 AM
Hi everyone,

I don't know how to ask my request but i try to re-scale my UISprite by using his pivot like left/right with new vectors.  :D

How can i achieve this re-scale? I saw something in UIWidgetInspector but i guess there something better than copy/paste code if this class.

Thx a lot :)
Title: Re: Pivot and UISprite
Post by: ArenMook on September 05, 2013, 05:15:10 AM
I'm not sure what you're asking. Sprite's size is its transform.localScale.
Title: Re: Pivot and UISprite
Post by: OnlineCop on September 05, 2013, 09:22:58 AM
It sounds like Warka0OO wants to change the pivot of his UISprite, then rescale the object, which would leave the left/right edge where it was, but it would change its center point as it grows.

It would effectively mimic the functionality of UIWidgetInspector.AdjustPosAndScale(), but dynamically instead of inside the Unity Scene view.

That's just my guess, anyway.  :P