public static void setColliderStateInChildren(GameObject rootObject, bool newValue)
{
//disable colliders by setting them to isTrigger so you can still run code on them
Collider[] colliders = rootObject.GetComponentsInChildren<Collider>(true);
for (int i = 0; i < colliders.Length; i++)
{
colliders[i].isTrigger = !newValue;
colliders[i].material = getPhysicMaterial();
}
}