Hi i was wondering if some one can tell me how to make animated objects transparent with the option to change after a certain amount of time?
This is what i have so far?
I have a Transparent/ bumped specular (not mobile).
I changed the texture (90% black) to a lightmap (is this right?)
I have a direct light and a few point lights in the scene.
It shows opacity in the unity viewer but not when its on the IPad.
I’m just not sure why its showing me one thing in unity and then doing something different on my Ipad.
I had an object that would go up and down in transparency. Below is the code for how I did it, and I attached the script to the object:
#pragma implicit
var updown: int = 1;
var glowtime: float;
function Awake () {[COLOR="#2e8b57"]//make object transparent right at start[/COLOR]
var glowingplate = GameObject.FindWithTag("GlowBillSlot");
[COLOR="#2e8b57"]//this line of code below is what sets the transparency of the GameObject[/COLOR]
glowingplate.renderer.material.color.a = 0;[COLOR="#2e8b57"]//sets object to be transparent;
//0 = completely transparent, 1 = no transparency at all[/COLOR]
}
function Update () {
var glowingplate = GameObject.FindWithTag("GlowBillSlot");
glowtime += updown*Time.deltaTime;
if(glowtime >= 1){
updown = -1;
glowtime = 1;
}
if(glowtime <= 0){
updown = 1;
glowtime = 0;
}
[COLOR="#2e8b57"]//this line of code below is what sets the transparency of the GameObject[/COLOR]
glowingplate.renderer.material.color.a = glowtime;
}
thanks so much. I’m going to give it a try and ill let you know how it go’s
Thanks again
Hi thanks so much for the script it works fine in the unity editor but when i build it to xcode and then run it to the ipad the object vanishes. This has been happing with all the transparency settings i do.
I dont no if you would no anything about this? (thinking it might be settings in xcode and not unity?)