Hello,
I have a game object with meny children. And right now I use this script to turn off all the children.
But is it possible to turn off specific children (im using renderer to deactivate):
var renderers = GetComponentsInChildren(Renderer);
for (var r : Renderer in renderers) {
r.enabled = false;
}
So if my children were names:
Child1 Child2 Child3
How would I turn off all children except Child2?