is it possible to make 2d real time coloring with masks (paint app)

Hello everyone,

So it comes up that i need to make a make-up game for girls, and one of the thing that am really stacked with is how to color a certain part of an object without effecting other objects, before explaining a little bit more, please watch 10 seconds of this video from the given time,
as you can see when he is applying the blue color to the eyelashes, it appears like he is coloring it “step by step” for now the only solution that i can think about in unity is to break the eyelashes to more than one object and each time a user touch an object it get colored.
But i want to know if there is a better solution for this ? if i have to make this in flash for example, i would add a mask in the eyelash layer that only make the eyelash shape visible and simply draw over it, any chance to make such a thing in unity ?
thank you

You could use Texture2D.GetPixels32() and Texture2D.SetPixels32() to get and set pixels of the texture. You could also use some sort of a second texture to define one or more masks for the setting of color. Note that modifying the pixels of a texture requires the texture to be marked as read/write which doubles the amount of texture memory required for a specific texture. In addition, the operation to set pixels requires that you copy all the pixels for the texture making the operation slower than native texture setting methods. I think you would be okay for most platforms, but you’ll have to do a performance test on your target platform. Note there are various examples of painting using Unity around, so I’d Google a bit and take a look at some example code.