I am trying to stream a video using theta z1 , through USB by taking camera texture as a skybox material.
I followed this tutorial, and I have this error.
When define camNam= " RICOH THETA Z1 4K" I got this error: Couldn’t find a supported mediatype for the selected Virtual Camera
When define camName = “RICOH THETA Z1”; I got this error:
Could not connect pins - RenderStream()
Here is my code
public class Get360Camera : MonoBehaviour
{
static WebCamTexture Camera;
string camName = "RICOH THETA Z1 FullHD"; // Name of your camera.
public Material camMaterial; // Skybox material
void Start()
{
WebCamDevice[] devices = WebCamTexture.devices;
//printing out all video sources for debugging purposes
Debug.Log("Number of web cams connected: " + devices.Length);
for (int i = 0; i < devices.Length; i++)
{
Debug.Log(i + " " + devices[i].name);
}
if (Camera == null)
Camera = new WebCamTexture(camName, 3840, 1920); // Resolution you want
if (!Camera.isPlaying)
Camera.Play();
if (camMaterial != null)
camMaterial.mainTexture = Camera;
}
}