WebCamTextureConstructor

매뉴얼로 전환
public WebCamTexture ();
public WebCamTexture (int requestedWidth, int requestedHeight, int requestedFPS);
public WebCamTexture (int requestedWidth, int requestedHeight);
public WebCamTexture (string deviceName);
public WebCamTexture (string deviceName, int requestedWidth, int requestedHeight);
public WebCamTexture (string deviceName, int requestedWidth, int requestedHeight, int requestedFPS);

파라미터

deviceNameThe name of the video input device to be used.
requestedWidthThe requested width of the texture.
requestedHeightThe requested height of the texture.
requestedFPSThe requested frame rate of the texture.

설명

Create a WebCamTexture.

Use WebCamTexture.devices to get a list of the names of available camera devices. If no device name is supplied to the constructor or is passed as a null string, the first device found will be used.

The requested width, height and framerate specified by the parameters may not be supported by the chosen camera. In such cases, the closest available values will be used.

Call Application.RequestUserAuthorization before creating a WebCamTexture.

Note: using webcam texture on Android requires a device running Honeycomb (Android 3.0) or later.

Note: if you want to use WebCamTexture to play the camera stream from device connected through Unity Remote, then you must initalize it through the constructor. Later it's not possible to change device using WebCamTexture.deviceName from regular devices to remote devices and vice versa.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961