I’m trying to create grid of images that i will add during the runtime.
The way i am doing this is by creating a prefab with image component and adding it to a list, then changing its sprite (If there’s a better way of creating an image object with custom images then please tell) using a method with some argument that will decide the image.
The problem i struck into, is that i don’t know how to load a texture with a string. And everyone on the internet says that you should avoid Resources folder by any means. Of course i can load all icons into a list, and then load then with some int variable, but this seems inconvenient.
Please tell me what i can do.