In my game i am going to make a part where you are able to make your own weapons which means that you will have a 32 by 32 pixel canvas that you can paint the color of the sword or whatever you want to make, The base color will be white so after the player hits done and save, it will save a screenshot of the 32 by 32 sprite to a file and then i want to make it import that photo back into the game and make all the white space transparent. Is there any scripting way to do this?
I don’t know how you’re trying to import the image, but from the WWW class of Unity you would receive a Texture2D, which has the methods GetPixels and SetPixels, which return and write Color arrays. With those you should be able to set their alpha on all white color values to 0 and write them back.