0

Good time of day, I want to make an image using the webcam. When I take image, call method texture.Stop(); but the camera is not freed anyway (white light is on). All work right in other platforms.

How to shut down a camera in WebGL?

The code method it taked image.

    private void OnCaptureTake()
    {
        if (_captureImage.texture != null)
        {
            ((WebCamTexture)_captureImage.texture).Stop();
            OnTakeTexture.SafeInvoke(_captureImage);
            _isOnClick = false;
            _takeCaptureButton.SetActive(false);
            _captureImage.gameObject.SetActive(false);
        } 
    } 

/*****************************************/

UPDATE

Link to the bug report on the unity bug report.

  • Can't believe this is not yet fixed. It's a bug and you need to file for a bug report. – Programmer Jun 06 '17 at 14:49
  • Can you supply the rest of the code? – Oscar Lundberg Jun 09 '17 at 21:52
  • This bug will be fixed in next version Unity. Answer from QA team: "I have checked this issue with latest Unity versions and can confirm that this is fixed in versions : 5.6.1p4, 2017.1.0b9, 2017.2.0a3 - just download one of these versions and your issues should disappear. Please note, that some of these versions are not published yet. https://unity3d.com/unity/beta - here you can get Unity 2017.1.0b9" – Daniil Forshenev Jun 18 '17 at 12:45

0 Answers0