workaround the runuat 5.2/5.3 build issue due to missing IOpenXRHMD.h from epic public headers
This commit is contained in:
@@ -41,7 +41,9 @@
|
|||||||
#include "Engine/SkeletalMesh.h"
|
#include "Engine/SkeletalMesh.h"
|
||||||
#include "Engine/World.h"
|
#include "Engine/World.h"
|
||||||
#include "GameFramework/WorldSettings.h"
|
#include "GameFramework/WorldSettings.h"
|
||||||
|
#if ENGINE_MAJOR_VERSION > 5 && ENGINE_MINOR_VERSION >= 4
|
||||||
#include "IOpenXRHMD.h"
|
#include "IOpenXRHMD.h"
|
||||||
|
#endif /* ENGINE_MAJOR_VERSION > 5 && ENGINE_MINOR_VERSION >= 4 */
|
||||||
#include "IOpenXRHMDModule.h"
|
#include "IOpenXRHMDModule.h"
|
||||||
#include "IXRTrackingSystem.h"
|
#include "IXRTrackingSystem.h"
|
||||||
#include "OpenXRCore.h"
|
#include "OpenXRCore.h"
|
||||||
@@ -994,6 +996,7 @@ bool FSGXRTracker::GetMotionControllerData(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if ENGINE_MAJOR_VERSION > 5 && ENGINE_MINOR_VERSION >= 4
|
||||||
IOpenXRHMD* OpenXRHMD{XRTrackingSystem->GetIOpenXRHMD()};
|
IOpenXRHMD* OpenXRHMD{XRTrackingSystem->GetIOpenXRHMD()};
|
||||||
if (!OpenXRHMD)
|
if (!OpenXRHMD)
|
||||||
{
|
{
|
||||||
@@ -1155,6 +1158,9 @@ bool FSGXRTracker::GetMotionControllerData(
|
|||||||
/// TODO
|
/// TODO
|
||||||
// This is reportedly a WMR-specific convenience function for rapid prototyping. Not sure if it's useful for OpenXR.
|
// This is reportedly a WMR-specific convenience function for rapid prototyping. Not sure if it's useful for OpenXR.
|
||||||
OutMotionControllerData.bIsGrasped = false;
|
OutMotionControllerData.bIsGrasped = false;
|
||||||
|
#else /* ENGINE_MAJOR_VERSION > 5 && ENGINE_MINOR_VERSION >= 4 */
|
||||||
|
XRTrackingSystem->GetMotionControllerData(WorldContextObject, Hand, OutMotionControllerData);
|
||||||
|
#endif /* ENGINE_MAJOR_VERSION > 5 && ENGINE_MINOR_VERSION >= 4 */
|
||||||
|
|
||||||
return OutMotionControllerData.bValid;
|
return OutMotionControllerData.bValid;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user