unity array replace one specific value code example
Example: array replace unity
intMaterials = new Material[cachedMaterial.Length]; for(int i=0; i<intMaterials.Length;i++){ intMaterials[i] = inReplaceMat; } cachedRenderer.materials = intMaterials;