Hello!
I am trying to create an array from a stack of images I have in a folder called "flash" in the Resources directory, then accessing those images from the array and applying them to a plane in my scene.
When I compile it tells me I can't do an implicit conversion. I'm a beginner at C#, and I cannot use Javascript for this task. Any help would be greatly appreciated.
Here is my code:
void Start () {
//create a new object array and load it with everything in Resources/flash
Object[] aImages = Resources.LoadAll("flash");
//debug report size of array and all objects inside it
Debug.Log("The size of the array is: " + aImages.Length);
int i = 0;
while (i < aImages.Length){
Debug.Log("The item at position" + i + " is: " + aImages*);*
*i++;*
*}*
*//take the first object from the image array and put it in variable texImage*
*Texture2D texImage = aImages[0];*
*//put texImage onto plane*
*renderer.material.mainTexture = texImage;*
*}*
*```*