首页 > 解决方案 > Unity3D 2019.3.0b7 录制 VideoCapture.CreateAsync 不调用回调函数

问题描述

我正在尝试从网络摄像头录制镜头,但是当我尝试初始化网络摄像头并调用 VideoCapture.CreateAsync 函数时,我提供的回调永远不会被调用。

我尝试使用 WebCamTexture 访问相机,效果很好。

我的 StartFunction 看起来像这样:

    VideoCapture.CreateAsync(OnCaptureCreate);

我的 OnCaptureCreate 函数如下所示:

    void OnCaptureCreate(VideoCapture videoC) {}

该功能与此处的统一文档中的相同:https ://docs.unity3d.com/2019.3/Documentation/ScriptReference/Windows.WebCam.VideoCapture.html 。

我已经找到了这个线程How to capture video from web camera using unity?但它只关注全息镜头,我正在尝试使用“UnityEngine.Windows.WebCam”命名空间中的 VideoCapture 进行录制。

有没有人和我一样的问题?

标签: unity3dwebcamvideo-capturewebcam-capture

解决方案


推荐阅读