-
-
Save bibinba/f21f9ec46e187f871341c987b4ae356c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class CallLoadScreen : MonoBehaviour | |
{ | |
public OVROverlay cubemapOverlay; | |
public OVROverlay loadingTextQuadOverlay; | |
public GameObject myCamera; | |
public float distanceFromCamToLoadText; | |
IEnumerator WaitforOVROverlay() | |
{ | |
Transform camTransform = myCamera.transform; | |
Transform uiTextOverlayTrasnform = loadingTextQuadOverlay.transform; | |
Vector3 newPos = camTransform.position + camTransform.forward * distanceFromCamToLoadText; | |
newPos.y = camTransform.position.y; | |
uiTextOverlayTrasnform.position = newPos; | |
cubemapOverlay.enabled = true; | |
loadingTextQuadOverlay.enabled = true; | |
yield return new WaitForSeconds(0.1f); | |
/////重い処理をここでする | |
// System.Threading.Thread.Sleep(2500); | |
cubemapOverlay.enabled = false; | |
loadingTextQuadOverlay.enabled = false; | |
yield return null; | |
} | |
public void LoadButton() | |
{ | |
StartCoroutine(WaitforOVROverlay()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment