Author Topic: [Solved] How to call callback function when TweenAlpha finishes?  (Read 2248 times)

Somoraze

  • Guest
Hi,

EDIT:
OK I found out how to do it :

  1. public UITweener.OnFinished onFinished;
  2.  
  3. void Start(){
  4.         onFinished += Test;
  5. }
  6.        
  7. void Test (UITweener tween)
  8. {
  9.         Debug.Log ("test");
  10. }
  11.  
  12. void Update(){
  13.         if (Input.GetKey("f") ) {
  14.                 TweenAlpha.Begin(myButton, 1, 0).onFinished = onFinished;
  15.         }
  16. }

Hope this helps
« Last Edit: August 03, 2013, 10:01:03 AM by Somoraze »

andrejvojtas

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 19
    • View Profile
Re: [Solved] How to call callback function when TweenAlpha finishes?
« Reply #1 on: August 29, 2013, 07:53:53 AM »
Thank you, this is pure gold!