Skip to main content
New Participant
July 9, 2024

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

 

    This topic has been closed for replies.

    1 reply

    New Participant
    September 6, 2024

    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...