Can I take a photo in Unity using the device's camera?

前端 未结 7 779
春和景丽
春和景丽 2020-12-06 00:18

I\'m entirely unfamiliar with Unity3D\'s more complex feature set and am curious if it has the capability to take a picture and then manipulate it. Specifically my desire is

相关标签:
7条回答
  • 2020-12-06 00:52

    It is possible. I highly recommend you look at WebcamTexture Unity API. It has some useful functions:

    1. GetPixel() -- Returns pixel color at coordinates (x, y).
    2. GetPixels() -- Get a block of pixel colors.
    3. GetPixels32() -- Returns the pixels data in raw format.
    4. MarkNonReadable() -- Marks WebCamTexture as unreadable
    5. Pause() -- Pauses the camera.
    6. Play() -- Starts the camera.
    7. Stop() -- Stops the camera.
    0 讨论(0)
提交回复
热议问题