Skip to content
Snippets Groups Projects
Commit 0f95bcd7 authored by David Gilbert's avatar David Gilbert :bug:
Browse files

fix(utilities): Fixes problem with check for HMD, now using new Unreal internal function.

parent 83371cec
No related branches found
No related tags found
2 merge requests!120UE5.4-2024.1,!113Pull dev/5.4 changes into dev/5.5
Pipeline #525667 failed
#include "Utility/RWTHVRUtilities.h"
#include "AudioDevice.h"
#include "HeadMountedDisplayFunctionLibrary.h"
#include "IHeadMountedDisplay.h"
#include "IXRTrackingSystem.h"
#include "Engine/Engine.h"
......@@ -18,9 +19,7 @@ bool URWTHVRUtilities::IsDesktopMode() { return !IsRoomMountedMode() && !IsHeadM
bool URWTHVRUtilities::IsHeadMountedMode()
{
// In editor builds: checks for EdEngine->IsVRPreviewActive()
// In packaged builds: checks for `-vr` in commandline or bStartInVR in UGeneralProjectSettings
return FAudioDevice::CanUseVRAudioDevice();
return UHeadMountedDisplayFunctionLibrary::IsHeadMountedDisplayEnabled();
}
bool URWTHVRUtilities::IsRoomMountedMode()
......
......@@ -38,7 +38,7 @@ public class RWTHVRToolkit : ModuleRules
PrivateDependencyModuleNames.AddRange(
new string[]
{
"NetCore"
"NetCore", "XRBase"
}
);
if (Target.bBuildEditor == true)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment