static void CheckNewMaterial(GameObject activeObject) { var AllObjects = new List <Transform>(); AllObjects.Add(activeObject.transform); Helpful.GetListOfAllChilds(activeObject.transform, AllObjects); ChangeNewMaterial(AllObjects, activeObject); }
static void CheckCheckedMaterial(GameObject activeObject, Material mat) { var AllObjects = new List <Transform>(); AllObjects.Add(activeObject.transform); Helpful.GetListOfAllChilds(activeObject.transform, AllObjects); if (mat != null) { ChangeCheckedMaterial(AllObjects, activeObject, mat); } else { ChangeCheckedMaterial(AllObjects, activeObject); } }