public void ApplyMaterial(PieceController pc, MaterialDef materialDef) { var mr = pc.GetComponentInChildren <MeshRenderer>(); mr.material = matPool.GetMaterial(materialDef); }