Generate a new sprite from painting

I’m interested in making a 2d pixel art skin editor, but i’m clueless in how to do it. The idea I had is to create a paint program in the game, read each pixel color with an array, create a 2d texture and export it into an sprite as a png. I’m not yet confident enough with C# and getting some ideas or resources would be a huge help, thanks!

the paint part is the hard part i think, there exist assets that u can buy (like uPainter | Painting | Unity Asset Store)

If you want to do this yourself, my best guess would be to use a render texture displayed either in 3d space or directly on screen depth, log screen positions(or screen to world positions when using the 3d space texture) on click and translate those screen positions to your texture (texture.setpixel)… Depending on how complex you want the paint functions to be u expand on this basic functionality.

After this part its an easy step to apply your texture to an existing material (Material.SetTexture) or save the texture to a png file (How to save a texture2d into a PNG? - Unity Answers)

good luck!