Reputation: 21
i want to make a live color detection using camera on android in unity. apps that i want is like "color grab" on playstore. anyone can help me how it works? or how to make it on unity?
Upvotes: 0
Views: 1276
Reputation: 2157
Well SO isn't a script providing service: always try to provide what you have tried already before asking a question. If you don't have any script, at least expose you way you want to do it, the steps you think are needed, ...
Anyway, I'd advise you to take a look at Unity Texture2D.ReadPixels()
method:
ReadPixels()
Texture2D.GetPixel()
If you want to search for a larger area (not a single pixel), you can look for all the pixels around the wanted location and then get the average color found.
Hope this helps,
Upvotes: 1