using System; using Cysharp.Threading.Tasks; using GadGame.Event.Customs; using GadGame.Event.Type; using GadGame.Network; using TMPro; using UnityEngine; using UnityEngine.UI; public class QRShowNewCTA : MonoBehaviour { [SerializeField] private RawImage _rawImage; [SerializeField] private VoidEvent _scanSuccess; [SerializeField] private GuestEvent _guestUpdatedSubscription; [SerializeField] private TMP_Text _descText; async void Start() { _descText.text = UdpSocket.Instance.DataReceived.Description; _rawImage.texture = await P4PGraphqlManager.Instance.GetQrLink(); // _timer.SetDuration(60).Begin(); } private void OnEnable() { _guestUpdatedSubscription.Register(ShowInfo); } private void OnDisable() { _guestUpdatedSubscription.Unregister(ShowInfo); } private void ShowInfo(Guest guest) { _scanSuccess.Raise(); } }