|
I am looking for a way to use iTween to ease the values of some custom variables on one of my scripts. It looks like ValueTo() is similar to what I would want, but I cannot figure out how to pass in a reference to the script as it is not a GameObject. Example: SampleClass would be attached to a game object. I would like to ease sampleValue.
(comments are locked)
|
|
In cases like this, you can use something like this: iTween.ValueTo(gameObject, iTween.Hash(.....)); Specifically type in "gameObject". See if that works for you.
(comments are locked)
|
|
That works perfectly thank you. That's useful thanks. You can also use the iTween.Hash() method to avoid instantiating a HashTable.
May 12 at 09:47 AM
philjhale
(comments are locked)
|
|
Word to the wise: Do not use "TweenUpdate" as your callback function name. That is a function in the iTween library that is in the call stack leading to the value tween update call. Doing this will cause your tween to recurse infinitely, will cause Unity to blow its stack and hang (boo, Unity! Ought to nuke any scripts in which stack depth exceeds a certain value!) and will leave you scratching your head going "wtf"?
(comments are locked)
|
