Hey,
this is a pretty simple piece of code and I have no idea why it wouldn’t work.
for(int i=0;i<tempArray.Length;++i)
{
m_PrevAlphas.Add(tempArray*.materials);*
-
}*
-
for (int i=0; i<tempArray.Length; ++i)*
-
{*
-
Color newColor = new Color (1.0f, 1.0f, 1.0f, m_TransparentAmount);*
_ for(int j=0;j<tempArray*.materials.Length;++j)_
_ {_
Texture tempTexture=tempArray.materials[j].GetTexture("MainTex");
tempArray.materials[j]=m_Mat; //THIS GETS IGNORED*
tempArray*.materials[j].SetTexture("MainTex",tempTexture);*
tempArray*.materials[j].color=newColor;*
* }*
* }*
Any idea why it wouldn’t get the Mat in tempArray*.materials[j]=m_Mat to my m_Mat? I checked the value of m_Mat and it is def valid, and there is already a material in that array that I can see so I know there is space in memory for it.*