I am attempting to turn off all of the child objects SkinnedMeshRenderers and I am using his script:
var theObject : GameObject;
function Update ()
{
theObject.GetComponentsInChildren.().enabled = false;
}
However I am receiving this error on run-time:
MissingFieldException: UnityEngine.SkinnedMeshRenderer[].enabled
Would I have to call the individual renderers, or is enabled not used for renderers?
↧