using System.Collections; using System.Collections.Generic; using UnityEngine; using XRTool.Util; public class SysEnterManager : MonoBehaviour { public CustomPeer cPeer; private GameObject pAbe { get { return UnityUtil.GetDepthChild(transform, "AudioBtnPause").gameObject; } } private GameObject oAbe { get { return UnityUtil.GetDepthChild(transform, "AudioBtnOpen").gameObject; } } private GameObject cAbe { get { return UnityUtil.GetDepthChild(transform, "AudioBtnClose").gameObject; } } private GameObject pVbe { get { return UnityUtil.GetDepthChild(transform, "VideoBtnPause").gameObject; } } private GameObject oVbe { get { return UnityUtil.GetDepthChild(transform, "VideoBtnOpen").gameObject; } } private GameObject cVbe { get { return UnityUtil.GetDepthChild(transform, "VideoBtnClose").gameObject; } } private void Update() { checkPeer(); } void checkPeer() { if (cPeer != null) { if (cPeer.isAudio) { if (!cPeer.isCloseAudio) { pAbe.SetActive(false); oAbe.SetActive(false); cAbe.SetActive(true); } else { pAbe.SetActive(true); oAbe.SetActive(false); cAbe.SetActive(false); } } else { pAbe.SetActive(false); oAbe.SetActive(true); cAbe.SetActive(false); } if (cPeer.isVideo) { if (!cPeer.isCloseVideo) { pVbe.SetActive(false); oVbe.SetActive(false); cVbe.SetActive(true); } else { pVbe.SetActive(true); oVbe.SetActive(false); cVbe.SetActive(false); } } else { pVbe.SetActive(false); oVbe.SetActive(true); cVbe.SetActive(false); } } } }