- Home /
Question by
benfattino · Aug 04, 2013 at 11:41 PM ·
arrayloadresources
Resources Load array
I'm using this part of a script to create a texture array loading with Resources.Load, but don't load the image on first position (scena_3_0) with index equal to zero. I check the script several time, but nothing. The script load all the texture except the first (i=0).
... function Awake () {
GroupTexture = new Texture [ArraySize];
for(i = 0; i < GroupTexture.Length; i++){
GroupTexture[i]= Resources.Load(TextName + Manager.SceneNumber.ToString() + "_" + i.ToString(), Texture);
}
this.renderer.material.SetTexture("_MainTexture1", GroupTexture[0]);
this.renderer.material.SetTexture("_MainTexture2", GroupTexture[1]);
this.renderer.material.SetFloat("_Blend", blend);
}
...
Somebody can help me? Unity 4.2 / osx mountain lion
Comment
Your answer
Follow this Question
Related Questions
Save Multiple GameObject with XML 1 Answer
Displaying object with button 1 Answer
Unity v4.1.5 Crashes When Using Resources.Load 0 Answers
Does Resources.Load not fail on purpose? 0 Answers