3DSelfie
Hansjoerg Hofer (1026632), Sebastian Metzler (0927550)
Main Page
Classes
Files
File List
screenQuad.cs
Go to the documentation of this file.
1
using
UnityEngine
;
2
using
System
.Collections;
3
9
public
class
screenQuad
: MonoBehaviour {
10
11
public
RenderTexture
renTex
;
12
public
WebCamTexture
webcamTexture
;
13
14
public
int
width
= 0;
15
public
int
height
= 0;
16
23
void
Awake () {
24
25
var deviceName =
""
;
26
if
(WebCamTexture.devices.Length>1)
27
deviceName = WebCamTexture.devices[1].name;
28
else
29
deviceName = WebCamTexture.devices[0].name;
30
31
webcamTexture =
new
WebCamTexture(deviceName, 1280, 720, 30);
32
33
webcamTexture.Play();
34
}
35
41
void
Update () {
42
Graphics.Blit (webcamTexture, renTex);
43
}
44
}
screenQuad.width
int width
Definition:
screenQuad.cs:14
System
screenQuad.webcamTexture
WebCamTexture webcamTexture
Definition:
screenQuad.cs:12
screenQuad
screenQuad script
Definition:
screenQuad.cs:9
screenQuad.renTex
RenderTexture renTex
Definition:
screenQuad.cs:11
screenQuad.height
int height
Definition:
screenQuad.cs:15
UnityEngine
Assets
Scripts
screenQuad.cs
Generated on Tue Jun 9 2015 23:14:09 for 3DSelfie by
1.8.9.1