Forum Discussion

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

Ramifications of setting OVRManager.runInBackground to true?

Are there ramifications of setting OVRManager.runInBackground to true?

it's line 474 of OVRManager.cs

7 Replies

Replies have been turned off for this discussion
  • kersk's avatar
    kersk
    Meta Employee
    OVRManager.runInBackground is a workaround that a handful of apps needed for the 1.3 release. It essentially disables our automatic handling of suspending game simulation, rendering, and audio playback when the headset is removed or when the user switches focus to Oculus Home. This does allow your game loop / C# scripts to continue running in the background, but then it's up to you to make sure your app does not impact the experience of the foreground VR app (i.e., you need to carefully manually pause rendering / music / etc).

    Note that we are working on a cleaner solution that will be exposed through Unity's "run in background" checkbox and this workaround will be going away once that is available. So I'd only recommend using this if you are blocked by the current behavior.
    • VintageGreen's avatar
      VintageGreen
      Adventurer

      Hey how can we do this in Unreal engine I can't find OVRmanager anywhere related to unreal nor run in background???

    • PiooStudio's avatar
      PiooStudio
      Honored Guest

      "Note that we are working on a cleaner solution that will be exposed through Unity's "run in background" checkbox"
      What is the result of this now in 2024 ?

  • Ok awesome. We were blocked and need to use it for beta testing. Thanks for the info!
  •  Very newbie to C# and the Windows 10 file hierarchy. Could anyone please tell me where to find the file OVRManager.cs so I can fix the black screen... I can not find it with a file search anywhere on the drive. 
  •  Very newbie to C# and the Windows 10 file hierarchy. Could anyone please tell me where to find the file OVRManager.cs so I can fix the black screen... I can not find it with a file search anywhere on the drive. 
  • It should be under assets/OVR/Scripts/OVRManager.cs