1 | initial version |
To turn off the MeshRenderer in a child component, you can use the following code:
GetComponentInChildren<MeshRenderer>().enabled = false;
This code will find the MeshRenderer component in the child component and set the enabled property to false, which will turn off the MeshRenderer.