Compare commits
2 Commits
878a8d18fa
...
a6e67d3b76
Author | SHA1 | Date | |
---|---|---|---|
|
a6e67d3b76 | ||
|
25d4ff6e92 |
@ -4,18 +4,17 @@
|
||||
|
||||
public class CameraManager : MonoBehaviour
|
||||
{
|
||||
public WebCamTexture wTexture;
|
||||
public WebCamDevice wDevice;
|
||||
public Button freezeButton;
|
||||
public Button resumeButton;
|
||||
public RawImage photoBox;
|
||||
private Texture2D photo;
|
||||
private int numberOfWebcams;
|
||||
private WebCamTexture wTexture;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void OnEnable()
|
||||
{
|
||||
wTexture = new WebCamTexture(wDevice.name);
|
||||
WebcamResume();
|
||||
}
|
||||
|
||||
@ -45,6 +44,9 @@ void Update()
|
||||
|
||||
public void WebcamResume()
|
||||
{
|
||||
if (wTexture == null)
|
||||
wTexture = new WebCamTexture(wDevice.name);
|
||||
|
||||
wTexture.Play();
|
||||
photo = null;
|
||||
freezeButton.gameObject.SetActive(true);
|
||||
|
Loading…
Reference in New Issue
Block a user