1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- 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);
- }
- }
- }
- }
|