How do I make a pixel art program?

I saw a devlog on someone making a pixel art program in their unity game. I was inspired and want to try this for my game too, however I can not find a single thing on the whole entire internet on how to create a pixel art editor/maker. No matter what you search up it will always just come up with “Best Pixel Art softwares to use”, “How to make pixel art”, “TOP 10 free pixel art editor”. You get the gist of it. Can someone please respond to this on how I can either make this or where I can find a video or tutorial to make one.

I’m not sure you’re searching for the right thing. If you search up ‘how to make a drawing application in C#’, you don’t even need to use Unity. However, if you do want to use Unity, here’s what I would recommend:


First, you could start off by defining a nested array of points that represent your pixels. For example:

int[,] ScreenPixels = new int[600,400] 

This would define a grid of points on your screen, that can be accessed by writing ScreenPixels[x,y] etc.


Then, you would need to fill the array with actual positions on the screen. This comes in handy, because it tells you what pixel the user has touched. You can do this by getting the Input.mousePosition and looping through the grid, and checking if one value in the grid is approximately similar to the mouse click position.


Finally, you could instantiate a sprite renderer in that region, and change its color to the chosen color by the user. Hope that helps. @Flaymes