12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- 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>(transform, "AudioBtnPause").gameObject; } }
- private GameObject oAbe { get { return UnityUtil.GetDepthChild<Transform>(transform, "AudioBtnOpen").gameObject; } }
- private GameObject cAbe { get { return UnityUtil.GetDepthChild<Transform>(transform, "AudioBtnClose").gameObject; } }
- private GameObject pVbe { get { return UnityUtil.GetDepthChild<Transform>(transform, "VideoBtnPause").gameObject; } }
- private GameObject oVbe { get { return UnityUtil.GetDepthChild<Transform>(transform, "VideoBtnOpen").gameObject; } }
- private GameObject cVbe { get { return UnityUtil.GetDepthChild<Transform>(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);
- }
- }
- }
- }
|