Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

WebCamTexture

Namespace: UnityEngine

/

Inherits from: Texture

Description

WebCam Textures are textures onto which the live video input is rendered.

Static Variables

devicesReturn a list of available devices.

Variables

deviceNameSet this to specify the name of the device to use.
didUpdateThisFrameDid the video buffer update this frame?
isPlayingReturns if the camera is currently playing.
isReadableReturns if the WebCamTexture is non-readable. (iOS only).
requestedFPSSet the requested frame rate of the camera device (in frames per second).
requestedHeightSet the requested height of the camera device.
requestedWidthSet the requested width of the camera device.
videoRotationAngleReturns an clockwise angle, which can be used to rotate a polygon so camera contents are shown in correct orientation.
videoVerticallyMirroredReturns if the texture image is vertically flipped.

Constructors

WebCamTextureCreate a WebCamTexture.

Functions

GetPixelReturns pixel color at coordinates (x, y).
GetPixelsGet a block of pixel colors.
GetPixels32Returns the pixels data in raw format.
MarkNonReadableMarks WebCamTexture as unreadable (no GetPixel* functions will be available (iOS only)).
PausePauses the camera.
PlayStarts the camera.
StopStops the camera.

Inherited members

Variables

hideFlagsShould the object be hidden, saved with the scene or modifiable by the user?
nameThe name of the object.
anisoLevelAnisotropic filtering level of the texture.
filterModeFiltering mode of the texture.
heightHeight of the texture in pixels. (Read Only)
mipMapBiasMip map bias of the texture.
widthWidth of the texture in pixels. (Read Only)
wrapModeWrap mode (Repeat or Clamp) of the texture.

Functions

GetInstanceIDReturns the instance id of the object.
ToStringReturns the name of the game object.
GetNativeTextureIDRetrieve native ('hardware') handle to a texture.
GetNativeTexturePtrRetrieve native ('hardware') pointer to a texture.

Static Functions

DestroyRemoves a gameobject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadMakes the object target not be destroyed automatically when loading a new scene.
FindObjectOfTypeReturns the first active loaded object of Type type.
FindObjectsOfTypeReturns a list of all active loaded objects of Type type.
InstantiateClones the object original and returns the clone.
SetGlobalAnisotropicFilteringLimitsSets Anisotropic limits.

Operators

boolDoes the object exist?
operator !=Compares if two objects refer to a different object.
operator ==Compares if two objects refer to the same.