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}");
}
}