private void SetMaterial(Material material) { Material[] mats = rend.sharedMaterials; if (mats[1] != material) { mats[1] = material; rend.sharedMaterials = mats; blinkController.InvalidateMaterials(); } }
public void SetPlaneMaterial(Material mat) { StopPlaneInfectionAnimation(); plane.SetActive(true); planeRend.sharedMaterial = mat; planeBlinkController.InvalidateMaterials(); }