Open unitycoder opened 4 years ago
https://www.youtube.com/watch?v=ROzHxAiLXOU i attach example here, can you please show with example?
yes, should use the "easy" method, would be complicated to keep track of pixels otherwise. (and this wouldnt require modifying the plugin source code, can use your own external script to do these)
easy: manually iterate all pixels in the main array and count used pixel colors, you can do that in another thread. main pixels array is the: private byte[] pixels; in MobilePaint.cs
complex: check how scene_MobilePaint_LockingMaskWithAreaCalculation.scene does fill amount checking, using PaintAreaEventListener.cs, then create or modify fill method to count area pixels also, and could use dictionary to keep track of each color fill counts. (but if user fills on top of another already filled color, that old color count is not updated..)