Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: spooky on June 10, 2014, 11:30:56 AM

Title: Tween Play On Awake?
Post by: spooky on June 10, 2014, 11:30:56 AM
There isn't an option on tweens (that I can find) for Play On Awake like on Unity's Audio Source component. I could just disable the component and re-enable it in code, but that's a lot more work than just having the ability for Tweens to not automatically play.

Edit: Another tweening question; how do you make a tween repeatable but play only once? With the Play Style property set to 'Once', I call PlayForward(), and it works, but the next time I call it, it seems to do nothing.
Title: Re: Tween Play On Awake?
Post by: spooky on June 10, 2014, 06:54:18 PM
Solved: Disabling (component checkbox) the tween and using the UIPlayTween script with the setting If target is disabled set to 'Enable Then Play' is a clean solution for Play on awake. Also, in order to play a tween from the beginning without reversing, the necessary code was ResetToBeginning().