Author Topic: What is the best way for to do....  (Read 14754 times)

mimmog

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 32
    • View Profile
Re: What is the best way for to do....
« Reply #30 on: October 06, 2014, 05:30:00 AM »
Eh. You see the OnFinished section on the tween? Drag & drop the tween's game object here. Now select the ResetToBeginning function.

Done, no need to write a script. ;)
Hi ! I tried but not work fine because if I recall NGUITools.SetActive(Menu, true); from script, it not work because when it disable the menu after first tween reverse it disable the menu but also the tween and not reenable it also if you set ResettoBeginning

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: What is the best way for to do....
« Reply #31 on: October 06, 2014, 10:34:32 AM »
So... call it yourself then.
  1. NGUITools.SetActive(Menu, true);
  2. Menu.GetComponent<UITweener>().ResetToBeginning();

mimmog

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 32
    • View Profile
Re: What is the best way for to do....
« Reply #32 on: October 06, 2014, 11:14:16 AM »
So... call it yourself then.
  1. NGUITools.SetActive(Menu, true);
  2. Menu.GetComponent<UITweener>().ResetToBeginning();
Ok but I have just set ResetToBeginning from editor -> UI Play Tween --> onFinished section Notify TweenScale -> ResetToBeginning why I must use the script code ? I don't want use the script..

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: What is the best way for to do....
« Reply #33 on: October 07, 2014, 09:58:32 AM »
All tweens derive from UITweener. When you use UIPlayTween, it plays a remote tween -- in your case TweenScale -- which derives from UITweener.

You can replace <UITweener> with <TweenScale> if you like. Same thing.