示例#1
0
    void Update()
    {
        if (bWaitForMojingWord)
        {
            try
            {
                if (MojingSDK.IsInMojingWorld(sdk.GlassesKey))
                {
                    bWaitForMojingWord = false;
                    MojingSDK.SetCenterLine();
                    NeedDistortion = MojingSDK.Unity_IsGlassesNeedDistortion();
                    UpdateProfile();
                    VRModeEnabled = MojingVRHead.Instance.VRModeEnabled;
                }
            }
            catch (Exception e)
            {
                MojingLog.LogError(e.ToString());
            }
        }

        if (Screen.width != windowWidth || Screen.height != windowHeight)
        {
            MojingSDK.Unity_OnSurfaceChanged(Screen.width, Screen.height);
            windowWidth  = Screen.width;
            windowHeight = Screen.height;
        }
    }
示例#2
0
 void Update()
 {
     if (bWaitForMojingWord)
     {
         try
         {
             if (MojingSDK.Unity_IsInMojingWorld(sdk.GlassesKey))
             {
                 bWaitForMojingWord = false;
                 MojingSDK.SetCenterLine();
                 NeedDistortion = MojingSDK.Unity_IsGlassesNeedDistortion();
                 UpdateProfile();
                 VRModeEnabled = vrModeEnabled;
             }
         }
         catch (Exception e)
         {
             MojingLog.LogError(e.ToString());
         }
     }
 }
示例#3
0
 public void ShowStereoImage()
 {
     SceneManager.LoadScene("StereoImage");
     MojingSDK.SetCenterLine(4, new Color(0.0f, 0.0f, 1.0f, 1.0f));
 }
示例#4
0
 public void ShowScene360Photo()
 {
     SceneManager.LoadScene("360PhotoDemo");
     MojingSDK.SetCenterLine(10, new Color(1.0f, 0.0f, 0.0f, 1.0f));
 }