IssueWithData() public static méthode

Create a data channel through the single 32-bit integer we are given to communicate with the plugin. Split the 32-bit integer event data into two separate "send-two-bytes" plugin events. Then issue the explicit event that makes use of the data.
public static IssueWithData ( RenderEventType eventType, int eventData ) : void
eventType RenderEventType
eventData int
Résultat void
    /// <summary>
    /// Issues Camera EndFrame Plugin Event
    /// </summary>
    public void CameraEndFrame(RenderEventType eventType)
    {
        int offs  = (eventType == RenderEventType.LeftEyeEndFrame) ? 0 : 1;
        int texId = CameraTextureIds[EyeBufferNum[CurrEyeBufferIdx] * 2 + offs];

        //Debug.Log( "CameraTextureId[ " + offs + "] = " + texId );
        OVRPluginEvent.IssueWithData(eventType, texId);
    }
Exemple #2
0
    public static void EndEye(OVREye eye, int eyeTextureId)
    {
#if UNITY_ANDROID && !UNITY_EDITOR
        RenderEventType eventType = (eye == OVREye.Left) ?
                                    RenderEventType.LeftEyeEndFrame :
                                    RenderEventType.RightEyeEndFrame;

        OVRPluginEvent.IssueWithData(eventType, eyeTextureId);
#endif
    }
    /// <summary>
    /// Marks the beginning of all rendering.
    /// </summary>
    public void BeginFrame()
    {
        bool updateFrameCount = !(OVRManager.instance.timeWarp && OVRManager.instance.freezeTimeWarp);

        if (updateFrameCount)
        {
            frameCount++;
        }

        OVRPluginEvent.IssueWithData(RenderEventType.BeginFrame, frameCount);
    }
    IEnumerator CallPluginEndOfFrame()
    {
        while (true)
        {
            yield return(new WaitForEndOfFrame());

            // Pass down the TimeWarpViewNumber aquired during CameraController.Update()
            // to link which sensor reading is associated with these images.
            OVRPluginEvent.IssueWithData(RenderEventType.TimeWarp, TimeWarpViewNumber);
        }
    }
Exemple #5
0
    /// <summary>
    /// Marks the beginning of all rendering.
    /// </summary>
    public void BeginFrame()
    {
#if (!UNITY_ANDROID || UNITY_EDITOR)
        bool updateFrameCount = !(OVRManager.instance.timeWarp && OVRManager.instance.freezeTimeWarp);
        if (updateFrameCount)
        {
            timeWarpViewNumber++;
        }

        OVRPlugin.Update(timeWarpViewNumber);

        OVRPluginEvent.IssueWithData(RenderEventType.BeginFrame, timeWarpViewNumber);
#endif

        if (UpdatedTracking != null)
        {
            UpdatedTracking();
        }
    }
Exemple #6
0
 public static void DoTimeWarp(int timeWarpViewNumber)
 {
             #if UNITY_ANDROID && !UNITY_EDITOR
     OVRPluginEvent.IssueWithData(RenderEventType.TimeWarp, timeWarpViewNumber);
             #endif
 }
Exemple #7
0
 /// <summary>
 /// Marks the end of all rendering.
 /// </summary>
 public void EndFrame()
 {
     OVRPluginEvent.IssueWithData(RenderEventType.TimeWarp, timeWarpViewNumber);
 }