Hi,
Does anyone know how to call textures into script through an array privately.
for example I have this.
private Texture[ ] numtex = new Texture[10];
void Start(){
numtex = Resource.LoadAll(“Sequence”) as Texture;
//I get an error, cannot convert type unityengine.Object[ ] to unityengine.Texture via reference conversion
// The next code snippet I have also done this and it works
numtex = Resources.FindObjectsOfTypeAll();
//but I have no idea where unity is drawing from since I am getting images ranging from the ones I want located in the Resource folder, to prefab screenshots to material screenshots so forth which are not.
}
also this second way scares me that it would be very processor intensive.
Any thoughts on how I could correctly call a series of textures into script privateley so I dont have to drag and drop through a public access modifer?