Search Unity

Problem with iTween.ValueTo

Discussion in 'Scripting' started by Dot45, Mar 29, 2013.

  1. Dot45

    Dot45

    Joined:
    Jan 27, 2010
    Posts:
    33
    hello , i want to interpolate float value but the itween still warn that it works only for float ,color, vectors,rect , even i already used float value but it still not work.

    // Use this for initialization
    void Start () {
    iTween.ValueTo(gameObject,iTween.Hash(
    "from",0.0f,
    "to",1000.0f,
    "onupdate","UpdateValue",
    "time",1
    ));
    }

    // Update is called once per frame
    void UpdateValue(float val) {
    Debug.Log (val);
    }