Esempio n. 1
0
 void CloseClick()
 {
     ExitPanel.SetActive(false);
     if (CameraShown)
     {
         qrController.StartCamera();
     }
     CameraShown = false;
 }
Esempio n. 2
0
    /// <summary>
    /// reset the QRScanner Controller
    /// </summary>
    public void StartScan()
    {
        if (e_qrController != null)
        {
            e_qrController.Reset();
        }
        if (e_qrController.e_DeviceController.isPlaying)
        {
            e_qrController.StopCamera();
            if (startBtn != null)
            {
                startBtn.transform.Find("Button Text").gameObject.GetComponent <Text>().text = "Scan QR code";
            }
        }
        else
        {
            e_qrController.StartCamera();
            if (startBtn != null)
            {
                print("yo");
                startBtn.transform.Find("Button Text").gameObject.GetComponent <Text>().text = "Stop QR scannen";
            }
        }

//		if (UiText != null) {
//			UiText.text = "";
//		}

//		if (resetBtn != null) {
//			resetBtn.SetActive(false);
//		}
        if (Game.Get().CurrentCanvas.name != "StartCanvas")
        {
            Transform temp = Game.Get().qrController.e_DeviceController.e_CameraPlaneObj.transform;
            temp.localPosition = new Vector3(temp.transform.localPosition.x, -1.83f, temp.transform.localPosition.z);
            temp.localScale    = new Vector3(0.4382933f, temp.localScale.y, temp.localScale.z);
        }
    }