Hello,
I have cube X that has a script
public class CameraPreview : MonoBehaviour {
WebCamTexture FrontPreviewCam;
string Frontcamera;
// Use this for initialization
void Start () {
WebCamDevice[] devices = WebCamTexture.devices;
Frontcamera = devices[1].name;
FrontPreviewCam = new WebCamTexture(Frontcamera,1920,1080,30);
GetComponent<Renderer>().material.mainTexture = FrontPreviewCam;
FrontPreviewCam.Play ();
}
now i have a button B that when pushed I want it to pause the webcamtexture that is in cube X
how would i reference this in the button B Onmousedown script?
thank you