12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- using System;
- using System.Collections;
- using UnityEngine;
- public class DebugVRStartup : MonoBehaviour
- {
- public bool IsReady
- {
- get
- {
- return DebugVRStartup.m_bReady;
- }
- }
- private void Awake()
- {
- DebugVRStartup.m_bReady = false;
- DebugVRStartup.m_bReady = true;
- this.EnableObjects();
- }
- private void EnableObjects()
- {
- if (this.m_bForceCamPos)
- {
- GameMain.Instance.MainCamera.SetPos(new Vector3(0f, 1.7f, 0f));
- }
- if (this.m_bForceFadeIn)
- {
- GameMain.Instance.MainCamera.FadeIn(1f, false, null, true, true, default(Color));
- }
- if (this.m_goEnableObject != null)
- {
- this.m_goEnableObject.SetActive(true);
- }
- for (int i = 0; i < this.m_aryEnableObjects.Length; i++)
- {
- this.m_aryEnableObjects[i].SetActive(true);
- }
- }
- private IEnumerator CoWaitOvrLoad()
- {
- Debug.Log(Time.frameCount);
- float fTimeBef = Time.realtimeSinceStartup;
- while (GameMain.Instance.OvrMgr == null || !GameMain.Instance.IsVRDeviceReady)
- {
- yield return null;
- if (Time.realtimeSinceStartup - fTimeBef > 6f)
- {
- NDebug.Assert("DebugVRStartup Time Out!:VRデバイスを認識できませんでした。", false);
- }
- }
- DebugVRStartup.m_bReady = true;
- this.EnableObjects();
- yield break;
- }
- public GameObject m_goEnableObject;
- public GameObject[] m_aryEnableObjects;
- [Header("強制フェードイン(リリース時も有効)")]
- public bool m_bForceFadeIn;
- [Header("強制カメラ位置 0.0f, 1.7f, 0.0f (リリース時も有効)")]
- public bool m_bForceCamPos = true;
- public static bool m_bReady;
- }
|