Ejemplo n.º 1
0
    void OnPostRender()
    {
        //DrawVignetteLine();
        screenFade();
        int eyeTextureId = Pvr_UnitySDKManager.SDK.eyeTextureIds[IDIndex];

        // SaveImage(Pvr_UnitySDKManager.SDK.eyeTextures[IDIndex], eye.ToString());
        Pvr_UnitySDKPluginEvent.IssueWithData(eventType, eyeTextureId);
        if (Input.GetKeyDown(KeyCode.JoystickButton0))
        {
            cube.transform.Rotate(0, 0, 360 * Time.deltaTime);
            SaveImages.SaveImage(Pvr_UnitySDKManager.SDK.eyeTextures[Pvr_UnitySDKManager.SDK.currEyeTextureIdx + (int)eye * 3], eye.ToString());
        }
#if !UNITY_EDITOR && UNITY_ANDROID
        if (eye == Eye.LeftEye && !setLevel && Pvr_UnitySDKManager.SDK.IsViewerLogicFlow)
        {
            AndroidJavaClass AvrAPI = new UnityEngine.AndroidJavaClass("com.unity3d.player.AvrAPI");
            Pvr_UnitySDKAPI.System.UPvr_CallStaticMethod(AvrAPI, "setVrThread");
            setLevel = true;
            Debug.Log("Viewer setVrThread");
        }
        else
        {
            return;
        }
#endif
    }
Ejemplo n.º 2
0
 void OnPostRender()
 {
     if (Input.GetKeyDown(KeyCode.JoystickButton0))
     {
         cube.transform.Rotate(0, 0, 360 * Time.deltaTime);
         SaveImages.SaveImage(Pvr_UnitySDKManager.SDK.eyeTextures[Pvr_UnitySDKManager.SDK.currEyeTextureIdx + (int)eyeSide * 3]);
     }
 }