예제 #1
0
        private void EntitlementCallback(Oculus.Platform.Message msg)
        {
            string strMsg;

            if (msg.IsError)
            {
                if (msg.GetError() != null)
                {
                    strMsg = msg.GetError().Message;
                }
                else
                {
                    strMsg = "Authentication failed";
                }
            }
            else
            {
                m_authenticated = true;
                strMsg          = "";
            }

            if (strMsg != string.Empty)
            {
                Debug.Log(strMsg, this);
            }

            if (!m_authenticated)
            {
                Debug.Log("User not authenticated! You must be logged in to continue.");
                Application.Quit();
            }
        }
예제 #2
0
 void OnOculusEntitlementResponse(Oculus.Platform.Message msg)
 {
     if (msg.IsError)
     {
         _isEntitled = false;
         Application.Quit();
         UnityEngine.Debug.LogError(string.Format("Entitlement error [{0}]: {1}", msg.GetError().Code, msg.GetError().Message));
     }
 }