Beispiel #1
0
 /// <summary>
 /// Stops the VR mode.
 /// </summary>
 public void StopVrMode()
 {
     if (VrManager.Instance.TimeWarp)
     {
         this.vrMode = false;
         NativePluginEvents.IssuePluginEvent(PluginEvents.Pause);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Starts the VR mode.
 /// </summary>
 public void StartVrMode()
 {
     if (VrManager.Instance.TimeWarp)
     {
         this.vrMode = true;
         NativePluginEvents.IssuePluginEvent(PluginEvents.Resume);
     }
 }
Beispiel #3
0
        /// <summary>
        /// Goes the global menu.
        /// </summary>
        public void GoGlobalMenu()
        {
            if (this.OnGlobalMenu != null)
            {
                this.OnGlobalMenu();
            }

            NativePluginEvents.IssuePluginEvent(PluginEvents.OpenGMenu);
        }
Beispiel #4
0
        /// <summary>
        /// Ends the eye frame.
        /// </summary>
        /// <param name="eye">The eye.</param>
        public void EndEyeFramne(Eyes eye)
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            PluginEvents pluginEventType = (eye == Eyes.Left) ?
                                           PluginEvents.LeftEyeEndFrame :
                                           PluginEvents.RightEyeEndFrame;
            int eyeSceneTextureId = this.Hmd.GetEyeSceneTextureId(eye);
            int eyeGazeTextureId  = 0; // Gaze texture is deleted.

            NativePluginEvents.IssuePluginEventWithParam(pluginEventType, ((long)eyeGazeTextureId << 32) + (long)eyeSceneTextureId);
#endif
        }
Beispiel #5
0
        /// <summary>
        /// Called when [application quit].
        /// </summary>
        private void OnApplicationQuit()
        {
            Debug.Log("OnApplicationQuit");

            NativePluginEvents.IssuePluginEvent(PluginEvents.QuitRenderThread);
        }
Beispiel #6
0
 /// <summary>
 /// Initializes the render thread.
 /// </summary>
 public void InitRenderThread()
 {
     NativePluginEvents.IssuePluginEvent(PluginEvents.InitRenderThread);
 }
Beispiel #7
0
 /// <summary>
 /// Does the time warp with CommandBuffer
 /// </summary>
 /// <param name="timeWarpViewIndex">Index of the time warp view.</param>
 /// <param name="buffer">the CommandBuffer to issue the event</param>
 public void DoTimeWarpWithCommandBuffer(int timeWarpViewIndex, CommandBuffer buffer)
 {
     NativePluginEvents.IssuePluginEventWithParamAndCommandBuffer(PluginEvents.TimeWarp, timeWarpViewIndex, buffer);
 }
Beispiel #8
0
 /// <summary>
 /// Does the time warp.
 /// </summary>
 /// <param name="timeWarpViewIndex">Index of the time warp view.</param>
 public void DoTimeWarp(int timeWarpViewIndex)
 {
     NativePluginEvents.IssuePluginEventWithParam(PluginEvents.TimeWarp, timeWarpViewIndex);
 }
Beispiel #9
0
 /// <summary>
 /// Platforms the UI global menu.
 /// </summary>
 public void PlatformUiGlobalMenu()
 {
     NativePluginEvents.IssuePluginEvent(PluginEvents.PlatformUI);
 }
Beispiel #10
0
 /// <summary>
 /// Platforms the UI confirm quit.
 /// </summary>
 public void PlatformUiConfirmQuit()
 {
     NativePluginEvents.IssuePluginEvent(PluginEvents.PlatformUIConfirmQuit);
 }