Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class Test : MonoBehaviour
- {
- public QRCodeDecodeController e_qrcontroller;
- string dataText = "";
- // Start is called before the first frame update
- void Start()
- {
- e_qrcontroller.onQRScanFinished += assignQRMessage;
- }
- void assignQRMessage(string str)
- {
- dataText = str;
- }
- private void OnGUI()
- {
- if (GUI.Button (new Rect (0, 0 , Screen.width, Screen.height / 10), "Reset"))
- {
- Reset();
- }
- GUI.Box(new Rect(0, Screen.height / 10, Screen.width, Screen.height / 10), "");
- GUI.Label(new Rect(0, Screen.height / 10, Screen.width, Screen.height / 10), dataText);
- }
- void Reset()
- {
- e_qrcontroller.Reset();
- }
- // Update is called once per frame
- void Update()
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement