Another script I need help converting. Scenario: Have game object that has no renderer but children all do. I want to disable all of the children rendering.
So Search function is working managed to find this in Java
var renderers = GetComponentsInChildren(Renderer);
for (var r : Renderer in renderers) {
r.enabled = false;
}
Heres the stage I am at.
public GameObject gun;
SOMETHING? renderers = GetComponentsInChildren<Renderer>();
foreach(Renderer r in renderers) {
r.enabled = false;
}
I am still unsure on how parts of the script work exactly (thus why I havent put gun into the script in my conversion because I do not know where it goes) , I am trying to enabled/disable the render of the GameObject gun(all of its children)
Cheers, Aaron Lewis