- Home /
Question by
laurienash · Aug 27, 2013 at 02:25 PM ·
itweenfadefadein
Fade in object using iTween
Hi - In my game I want to be able to both fade in and fade out objects, using iTween.
I've got the code working to fade objects out, but when I want to fade them in - nothing happens.
Here's the code I've got so far:
var object : GameObject;
function OnTriggerEnter(other: Collider){
FadeIn();
}
function FadeIn() {
iTween.ValueTo(gameObject, iTween.Hash("from", 0f, "to", "time", 3f, "easetype", "linear", "onupdate", "setAlpha"));
}
Does anyone know what I'm doing wrong?
Thanks, Laurien
Comment