Forum Discussion

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

How to prevent the application from terminating when the quest link disconnects and returns.

I am developing a PC VR application using UE5.3.2 and MetaXR Plugin 1.95.0.

I do not want the application to terminate if QuestLink disconnects and lets it return.
Does anyone know how to do this?

When using the OpenXR plug-in, this can be achieved by ExecuteCommanding the following.

xr.OpenXRExitAppOnRuntimeDrivenSessionExit false

 

1 Reply

Replies have been turned off for this discussion
  • I have found that by commenting out the following if statement in Source/OculusXRHMD/Private/OculusXRHMD.cpp of MetaXR Plugin, I can keep the application from exiting.

    if (OVRP_SUCCESS(FOculusXRHMDModule::GetPluginWrapper().GetAppShouldQuit2(&AppShouldQuit)) && AppShouldQuit || OCFlags.EnforceExit)
    {
    	/*FPlatformMisc::LowLevelOutputDebugString(TEXT("OculusXRHMD plugin requested exit (ShouldQuit == 1)\n"));
    ...
    	retval = false;*/
    }

    However, when QuestLink returns, nothing is visible on the HMD.
    In OpenXR, the EnableHMD node makes the HMD visible, but the MetaXR plugin does not...