Author Topic: Tween Play On Awake?  (Read 3122 times)

spooky

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 16
    • View Profile
Tween Play On Awake?
« 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.
« Last Edit: June 10, 2014, 12:03:33 PM by spooky »

spooky

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 16
    • View Profile
Re: Tween Play On Awake?
« Reply #1 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().
« Last Edit: June 10, 2014, 07:23:00 PM by spooky »