I'm trying to make a coloring game, of which I already have a drawing (outline) of an object - let's say a face of a dog. How can I do it that whenever I click for example the eyes, it will "fill" any empty space inside the eye part of the image to a specific color?
The other solution I have of this is to manually export each "spaces" I want the player to color [ex: eyes, mouth, nose, and empty face]. And then I would just assemble back these images to their correct placements to give an illusion that's just one whole image of a dog's face. The player can now click the nose, and the nose's color would then change.
This is nice for simple images with 4-5 parts. But for example abstract looking drawings where it has like 70-100 spaces, exporting them and then assembling them 1 by 1 would be such a tedious task. Is there any way I could just import the outline drawing in Unity, and let Unity automatically detects these spaces for me?
Texture.SetPixels()
orSetPixels32()
, which you can find explained in the Unity API documentation, then call Apply() to send the updated version to the GPU. \$\endgroup\$