WebCamTexture.WebCamTexture

static function WebCamTexture (deviceName : String, requestedWidth : int, requestedHeight : int, requestedFPS : int) : WebCamTexture

Parameters

NameDescription
deviceName The name of the video input device to be used. Use WebCamTexture.devices to get a list of supported devices.
requestedWidth The requested width of the texture. The real width may be different, and will match the closest width supported by the device.
requestedHeight The requested height of the texture. The real height may be different, and will match the closest height supported by the device.
requestedFPS The requested frame rate of the texture. The real frame rate may be different, and will match the closest frame rate supported by the device.

Description

Create a WebCamTexture.

Note that if you want to use WebCamTextures in the web player, you need to get the user's permission to do so. Call Application.RequestUserAuthorization before creating a WebCamTexture.

static function WebCamTexture (deviceName : String, requestedWidth : int, requestedHeight : int) : WebCamTexture

static function WebCamTexture (deviceName : String) : WebCamTexture

static function WebCamTexture (requestedWidth : int, requestedHeight : int, requestedFPS : int) : WebCamTexture

static function WebCamTexture (requestedWidth : int, requestedHeight : int) : WebCamTexture

static function WebCamTexture () : WebCamTexture