- Home /
Question by
hi_rahul86 · Apr 17, 2012 at 12:45 PM ·
scenefade
How to fade a gameobject containing child objects in it
Hi,
I have taken an empty game object in which I have four child game objects. All are planes. I need to fade in and out the game object. Please help.
Comment
transform.material.renderer.color.a
will allow you to control the alpha (transparency) of the game object.
But the game object is empty. And the code you have is not working because I need to fade inner one not the outer one
Something like this should work, then.
foreach(vat t in transform.GetComponentsInChildren(typeof(Transform))
{
t.material.renderer.color.a = fadeValue;
}
Your answer
Follow this Question
Related Questions
Fade Between Scenes Easily 0 Answers
Fade GUITexture in when previous GUITexture fade out 2 Answers
Circular in/out effect for scene 1 Answer
How to fade a scene in/out 1 Answer