2016-09-28 4 views
5

Gear VR App에서 버튼 클릭시 URL을 여는 방법을 알고 싶습니다. 이 시나리오에서는 Oculus Store의 Samsung Internet App을 사용할 수 있습니다. 2D Non-VR Android Application처럼 URL은 기본 브라우저를 기반으로 Chrome 또는 Firefox에서 자동으로 열립니다. 하지만 Gear VR 앱에서 전화 할 때Virtual Reality (GearVR) 앱에서 URL을 여는 방법

Application.OpenURL("http://www.google.co.uk"); 

앱이 정지됩니다.

이것이 전혀 가능하지 않다면 3D 공간에서 다루기 어려운 웹 뷰를 표시 할 수있는 방법이 있습니까?

모든 종류의 도움을 주실 수 있습니다.

답변

1

Oculus 포럼에서 this post의 솔루션을 발견했습니다. 열기는 하려고 할 때 사용자가 응용 프로그램 동결의 부조화 영상을 피하기 위해 응용 프로그램을 열기 전에 헤드셋을 제거 할 때까지

public class OpenWebsiteOnHeadsetRemove : MonoBehaviour 
{ 
    #region Serialized 
    public OVRManager m_OVRManager; 
    #endregion 

    #region Variables 
    private bool m_UserPresent = true; 
    private bool m_HasOpenedURL = false; 
    #endregion 

    #region Lifecycle 
    private void Update() { 
    #if UNITY_ANDROID 
     bool isUserPresent = m_OVRManager.isUserPresent; 

     if(m_UserPresent != isUserPresent) 
     { 
      if(isUserPresent == false && m_HasOpenedURL == false && Application.isEditor == false) 
      { 
       m_HasOpenedURL = true; 
       Application.OpenURL("http://www.google.co.uk"); 
      } 
     } 

     m_UserPresent = isUserPresent; 
    #endif 
    } 
    #endregion 
} 

그것은 대기 : 여기

는 작업 코드 URL. 플레이어가 헤드셋을 끄고 에 다시 놓으면 게임에서 있던 위치로 되돌아갑니다. Glitchers Games

:


희망이 늦게 사용자 :

씨의 도움

관련 문제