title: How to change the Texture Type of a .png image to Sprite through a script in Unity?
body: <p>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.</p>
  <p>What I need to do is that when reading those images, I change the Texture Type to &quot;Sprite&quot; through a script (by default is set to &quot;Default&quot;), since it is necessary that they have a Texture Type &quot;Sprite&quot; to be able to put the image in a canvas.</p>
  <p>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.</p>
  <p>Greetings.
  <a href="https://i.stack.imgur.com/HRFrm.png" rel="nofollow noreferrer">inspector configuration on an image</a></p>