Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Tomleung on January 09, 2015, 08:28:24 AM

Title: UI with Tween Problems
Post by: Tomleung on January 09, 2015, 08:28:24 AM
Suppose I use some UI elements with anchors (or constrained), which means the transform of these UI elements would change base on some conditions.

So if I want to use Tween Scripts provided on NGUI with these UI elements, would it be the problems because I can't write the exact transform position on the inspector?

How should I suppose to do?

Sorry for my poor English! Thank you!
Title: Re: UI with Tween Problems
Post by: ArenMook on January 10, 2015, 12:24:34 PM
Anchored elements can be animated using NGUI's tweens, but you may want to anchor a container instead, then animate actual widgets that are children of that container.
Title: Re: UI with Tween Problems
Post by: Tomleung on January 11, 2015, 10:48:21 AM
Anchored elements can be animated using NGUI's tweens, but you may want to anchor a container instead, then animate actual widgets that are children of that container.

If I understand correctly of your advice, I have to make a container and anchor it, and then make the UI elements  be the childs of the container then I could solve the tween problems? The container would have the exact transform position so that I can use Tween Script on it?
Title: Re: UI with Tween Problems
Post by: ArenMook on January 12, 2015, 01:15:32 AM
The problem would be solved because all children would be automatically moved due to the parent being anchored. You can put tweens on the children without worrying about the anchoring this way.