- Home /
iTween :: fading out an empty with Children
hi there!
i have an Empty with two planes as children. this prefab is instantiated by script and should be destroyed the same way. before destroying i want it to be faded out. The Empty only has a Transform, a BoxCollider and a Script. I added a Renderer to use iTween on it, but when i fade the gameObject out its not faded, only destroyed.
function removeCard() { iTween.fadeTo(gameObject,{"alpha":0, "time":.3, "delay":1, "onComplete":"destroy"}); }
function destroy():void{ Destroy(gameObject); }
shurely it is because the fade is working on the Empty only, not on its children. but is there a way to fade out the whole group of a parent and its children?
thanx!
i found out that there is "includeChildren" set TRUE by default...
uh, but i remember reading something about the texture to be set to a special type...
Answer by headkit · Apr 29, 2010 at 11:44 AM
o.k. ttahts the deal: set your Material to Transparent/Diffuse. now its working!
Your answer
Follow this Question
Related Questions
change y position of child when relative to parent and iTween 0 Answers
How do I fade out a Toon shaded character with iTween? 1 Answer
iTween can't access instantiated child. 1 Answer
iTween CameraFade not working in some cases (related to camera's cullingMask) 3 Answers
Material doesn't have property '_Color' 4 Answers