Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
MikeF's avatar
MikeF
Trustee
11 years ago

Disable vsync in 0.6.0

I'm trying to disable vsync in the latest sdk but it doesnt seem to have any effect when turning it off through the quality settings, is there a workaround for this?

9 Replies

Replies have been turned off for this discussion
  • What version of Unity are you using? Testing stand-alone build or in editor? Extended or Direct Mode?
  • Sorry, was in a rush
    -5.0.3f2
    -same result in editor and build of vsync forced on
    -same result with direct mode and extended
  • I see this comment in OVRManager.cs:

    SDK rendering forces vsync unless you pass ovrHmdCap_NoVSync to Hmd.SetEnabledCaps()


    EDIT: Removed my bad information.

    Does that fix your issue?
  • Sorry, that was bad info. Just my luck for trying to code without compiling it.

    The real fix is below. You can add this code to the bottom of Update() in OVRPlayerController:

    if(Input.GetKeyUp(KeyCode.N)){
    uint caps = OVRManager.capiHmd.GetEnabledCaps();
    caps ^= (uint)HmdCaps.NoVSync;
    OVRManager.capiHmd.SetEnabledCaps(caps);
    }
  • Ok i tried putting it where you said and i'm getting this error:
    The name `HmdCaps' does not exist in the current context
  • You need to put this at the top of the file under the other using statements (around line 24):

    using Ovr;