playMaker

Author Topic: How do you set children renderer on or off recursively?  (Read 1276 times)

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
How do you set children renderer on or off recursively?
« on: December 10, 2014, 10:54:41 PM »
I have objects, like tanks, that have a number of children.  I want it to stay active so the whole thing is invisible.  The problem is each part has a renderer.  Is there a way to set all of the children's renderer's on or off at the same time? 


Something like unity's "GetcomponentsInChildren"????
==============================================

for(var r : Renderer in GetComponentsInChildren(Renderer))
{
     r.enabled = false;
}

===============================================
I did find something similar for materials but not renderers.
http://hutonggames.com/playmakerforum/index.php?topic=1053.0
===============================================
I did find this but in his post he says 'set visibility' has a recursive option, but I do not see it.  Picture included
http://hutonggames.com/playmakerforum/index.php?topic=159.0
« Last Edit: December 10, 2014, 11:37:39 PM by wheretheidivides »