コード例 #1
0
        private void QrTracker_Updated(QRCodeUpdatedEventArgs args)
        {
            lock (qrCodesList)
            {
                if (!qrCodesList.ContainsKey(args.Code.Id))
                {
                    Debug.LogWarning("QRCode updated that was not previously being observed: " + args.Code.Code);
                }

                qrCodesList[args.Code.Id] = args.Code;
            }

            QRCodeUpdated?.Invoke(this, QRCodeEventArgs.Create(args.Code));
        }
コード例 #2
0
        private void QRWatcherUpdated(object sender, QRCodeUpdatedEventArgs args)
        {
            lock (qrCodesList)
            {
                if (!qrCodesList.ContainsKey(args.Code.Id))
                {
                    Debug.LogWarning($"QRCode updated that was not previously being observed: {args.Code.Data}");
                }

                qrCodesList[args.Code.Id] = args.Code;
            }

            Debug.Log("QR Code Updated: " + args.Code.Data);
            QRCodeUpdated?.Invoke(this, args.Code);
        }