Background
I am a big fan of tween systems and I do like iTween as my currently preferred method for doing tweens in Unity. But the big issues with iTween is that it is not generic enough… and the reason it is not generic is the lack of dynamic referencing. Without dynamic referencing, iTween is forced to establish a large array of AbcTo and XyzFrom functions.
Now if I want to add functionality such as a simulation toggle where I want to be able to turn off the tweening and immediately “complete” the tween then I’m forced to modify iTween in many locations just to add that functionality.
Solutions (sort of)
So one solution would be to add dynamic referencing directly into Unity - this would be the preferred method but would need to be implemented by Unity. The alternative is to use eval… which I’m currently cough evaluating. And eval does appear to work, but I am obviously very wary of using such a method and hope that someone at Unity will provide the official word on the ins and outs of using eval.
- My first concern is speed - what sort of performance hit will I get for… eval(“position.x = 1.5”)? Can I do a couple hundred per second? How about a thousand?
- My next concern is compatibility - is eval supported on all platforms?
I’m working on a casual puzzle based game so there are more than a few locations where I plan to use tweening but I probably won’t break the bank regarding performance… but then again I may ship on iOS and do worry about the iPhone.
Please advise.
Thanks,
Jason