【发布时间】:2014-08-16 12:08:59
【问题描述】:
我正在尝试使用WebCamTexture 在场景中显示网络摄像头输入。我创建了一个带有一些默认纹理的 Sprite,并为其附加了以下脚本:
public class CameraTexture : MonoBehaviour {
void Start () {
WebCamTexture webcamTexture = new WebCamTexture();
renderer.material.mainTexture = webcamTexture;
webcamTexture.Play();
}
}
但是,当我(在 PC 上)运行场景时,不显示相机输入,只显示默认纹理。 以下是我所知道的:
-
webcamTexture不为空,设备已正确找到 - 摄像头设备工作正常
- 其他应用没有挡住摄像头
为什么不显示摄像头输入?
【问题讨论】: