Unity crash when Webtexture.Play()

When I play unity engine in below code, I encounterd unity crash.

But in another my computer , I didnt encounterd it.

whenever Add WebCamtexture.Play() to my code, the engine crash.

please any help

code

using UnityEngine;
using UnityEngine.UI;


public class LiveStreamCapture : MonoBehaviour
{
    public string deviceNameKeyword ="RICOH THETA UVC";
    private WebCamTexture webcamTexture;

    void Start()
    {
        StartStreaming();
    }

    void StartStreaming()
    {
        WebCamDevice device = new WebCamDevice(); 
        foreach (WebCamDevice a in WebCamTexture.devices)
        {
            Debug.Log(a.name);
            if (a.name.Contains(deviceNameKeyword))
            {
                device = a;
            }
        }
        webcamTexture = new WebCamTexture(device.name);
        webcamTexture.Play();
        Debug.Log($"γƒ‡γƒγ‚€γ‚Ήγ‹γ‚‰γ‚ΉγƒˆγƒͺγƒΌγƒŸγƒ³γ‚°δΈ­: {device.name}");
    }

}
1 Like
  1. Try to delete the Non-English characters in line 28.
  2. Try to learn the Editor logs and provide them here: Unity - Manual: Log files