I would like to display a THETA V live stream onto a Unity sphere.
I am trying WebCamTexture. It works on Mac OS X on the same hardware as Windows 10 (dual-boot). However, I can’t get it to work on Windows 10.
This is the error.
Could not connect pins - RenderStream()
webCamDetect:Start() (at Assets/webCamDetect.cs:23)
This is the sample code:
public class webCamDetect : MonoBehaviour
WebCamDevice devices = WebCamTexture.devices;
Debug.Log("Number of web cams connected: " + devices.Length);
for (int i = 0; i < devices.Length; i++)
Debug.Log(i + " " + devices[i].name);
string camName = devices.name;
Debug.Log("The webcam name is " + camName);
Renderer rend = this.GetComponentInChildren<Renderer>();
WebCamTexture mycam = new WebCamTexture();
mycam.deviceName = camName;
rend.material.mainTexture = mycam;
I have tried both RICOH THETA V and RICOH THETA V 4K. I have the driver RICOH THETA UVC 4K installed.
This information on Stackoverflow might be relevant.
The error message mentioning “RenderStream” supposedly corresponds to problem that Unity3D is unable to build a video streaming pipeline using DirectShow API. The message itself is not showing the root cause and in the order of probability (most probable first) it can be:
- your code attempts to use one camera in 2+ places simultaneously, whereas the camera is exclusive use resource
- WebCamTexture implementation and webcam driver have certain incompatibility which results in inability to construct new streaming sessions
- problem in webcam driver that somehow fails to close video capture session so that next attempt to use WebCamTexture fails; restart of the application (closed hosting process) cleans the problem up