its ok now, i was getting a red error symbol with no writting in the console, was my own fault i had a line wrong, thank you again
I had to look it up, since that can’t be right – those 2’s are the size. All this weird file stuff is to choose a set of 4 colors. And they’re in img format, since why not. This thread is now officially hilarious.
If I’m not mistaken, that’s the “official” way to load a Texture from a file in Unity, as you need to create the texture before loading the file (dumb, as the function should be a static one), and the constructor accepts only a width/height > 0, so people just do a new(1,1) or new(2,2)…
ok a question please, i have it all working as i wanted with your help i am using this below to get the directory to read the files
- DirectoryInfo dir = new DirectoryInfo(“C:/Images/”);
- FileInfo[ ] info = dir.GetFiles(“*.img”);
i have the random working and it displays an image from the folder when i click the mouse, is there a way to stop it repeating the same image , i have tried to compare strings but it seems to ignore it and still sometimes chooses the same picture again to load, how would i get the index number of the loaded image from the directory to check if it gets picked again straight away,