using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class DebugConnectArrow : MonoBehaviour { [SerializeField] GameObject btnConnectArrow; void FixedUpdate() { UpdateBtnForConnect(); } BluetoothStatusEnum bowStatus; BluetoothStatusEnum arrowStatus; void UpdateBtnForConnect() { if (BluetoothShoot.ins && arrowStatus != BluetoothShoot.ins.status) { arrowStatus = BluetoothShoot.ins.status; (int textID, Color color) = BluetoothStatus.GetStatusInfo(BluetoothShoot.ins.status); btnConnectArrow.GetComponentInChildren().SetText(textID); btnConnectArrow.GetComponentInChildren().color = color; } } }