I want to take a texture, replace the colours with some colours and save the new one as a file.
My idea is
- Copy file
- Loop over pixels
- Check if selected pixel colour is equal to one of the colours I wish to replace
- if it is, replace colour
- save file of modified texture to disk
is there unity API which lets me do this? I know there's texture2d.getpixels but I'm not sure if it lets you write. I also want to make a copy of the texture in memory so as to not mess up the original. Thanks!