johnatm / itween

Automatically exported from code.google.com/p/itween
1 stars 2 forks source link

ValueTo "onupdate" callback not called #95

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
void Start () {
    iTween.ValueTo(go, iTween.Hash("from",0, "to",10, "onupdate","onUpdate", "time",1));
}
void onUpdate(float newValue){
    print(newValue);
}

onUpdate callback never gets called

iTween C# v 2.0.45 
Unity Pro 3.4.1 

Original issue reported on code.google.com by mudak...@gmail.com on 17 Nov 2011 at 6:40

GoogleCodeExporter commented 8 years ago
change code :

Method 1:

 iTween.ValueTo(go, ...)   ==> iTween.ValueTo(gameObject,...)

because iTween's callback is called by SendMessage()...

Method 2 : 

  iTween.Hash(..., "onupdatetarget",gameObject,...);

Original comment by MLDevStu...@gmail.com on 27 Mar 2013 at 2:28