Version: 2017.3

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);

パラメーター

deviceName 使用しているデバイス名
requestedWidth リクエストされたテクスチャの幅
requestedHeight リクエストされたテクスチャの高さ
requestedFPS リクエストされたテクスチャのフレームレート

説明

WebCamTexture を作成する

WebCamTexture.devices を使用して、利用できるカメラ デバイスの名前のリストを取得します。デバイス名がコンストラクタに提供されない場合や、null 文字列で渡された場合は、最初に見つかったデバイスが使用されます。

パラメーターによって指定した幅、高さ、フレームレートは選択されたカメラにサポートされていない場合があります。そのような場合は、最も近い使用可能な値が使用されます。

Call Application.RequestUserAuthorization before creating a WebCamTexture.

注意: AndroidでWebCamTextureを使用する場合は、Honeycomb (Android 3.0) 以降が動作している端末が必要になります。

注意 WebCamTexture を使用して Unity Remote 経由で接続されたデバイスからカメラ ストリームを再生したい場合は、そのデバイスをコンストラクタで初期化しなければなりません。後から WebCamTexture.deviceName で通常デバイスからリモート デバイス、または、リモート デバイスから通常デバイスに変更することはできません。

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