using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class AllotPanel : MonoSingleton { public TMP_Text allotText; private float times = 0; public void SetAllotText( string msg) { allotText.text = msg; } private void OnEnable() { times = 0; } private void Update() { times += Time.deltaTime; if(times>120) { times = 0; Debug.LogError(" 申请协助超时!!!! "); if (RTCRoomManager.Instance.rtcState != RTCEnum.OFF) RTCRoomManager.Instance.LeaveChannel(); } } }