I am using Unity and I have a lot of images in the Resource folder. I am saving these images using my nodejs and MySQL server.
What I need to do is that when reading those images, I change the Texture Type to "Sprite" through a script (by default is set to "Default"), since it is necessary that they have a Texture Type "Sprite" to be able to put the image in a canvas.
I know that it can be done using the Unity inspector but I need to do it with a script, since I don't know which images are going to be in what quantity.
Greetings. inspector configuration on an image