Author Topic: Confusing UITweenPlay behavior  (Read 1677 times)

AeornFlippout

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 46
    • View Profile
Confusing UITweenPlay behavior
« on: January 24, 2014, 05:45:49 PM »
The UITweenPlay component has a Condition, and a separate play direction setting.

However, it seems that the OnHover() function implicitly assumes that if the Hover is ending, the direction should be reversed.
So, using a play direction of "reverse" with "on hover exit" results in a forward play.

Is this a bug?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: Confusing UITweenPlay behavior
« Reply #1 on: January 24, 2014, 11:49:23 PM »
Both hover and press are like that intentionally, as they have dual states. The idea is that you set up only one tween, and NGUI will play it forward in OnHover(true), then automatically reverse it in OnHover(false).

AeornFlippout

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 46
    • View Profile
Re: Confusing UITweenPlay behavior
« Reply #2 on: January 25, 2014, 10:47:34 AM »
I guess that makes sense to me in the case of using the "OnHover" trigger with a "Toggle" direction.

It doesn't really make sense that it gives an option to play a tween in forward or reverse, and explicitly state that this is for an "onHoverExit" condition - and then play the tween forward though. There's nothing in the UI that would suggest that if you're using the "OnHoverExit" trigger that you should choose the "Forward" direction if you actually want it to play in reverse.