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/World.h"
|
||||
#include "GameFramework/WorldSettings.h"
|
||||
#if ENGINE_MAJOR_VERSION > 5 && ENGINE_MINOR_VERSION >= 4
|
||||
#include "IOpenXRHMD.h"
|
||||
#endif /* ENGINE_MAJOR_VERSION > 5 && ENGINE_MINOR_VERSION >= 4 */
|
||||
#include "IOpenXRHMDModule.h"
|
||||
#include "IXRTrackingSystem.h"
|
||||
#include "OpenXRCore.h"
|
||||
@@ -994,6 +996,7 @@ bool FSGXRTracker::GetMotionControllerData(
|
||||
return false;
|
||||
}
|
||||
|
||||
#if ENGINE_MAJOR_VERSION > 5 && ENGINE_MINOR_VERSION >= 4
|
||||
IOpenXRHMD* OpenXRHMD{XRTrackingSystem->GetIOpenXRHMD()};
|
||||
if (!OpenXRHMD)
|
||||
{
|
||||
@@ -1155,6 +1158,9 @@ bool FSGXRTracker::GetMotionControllerData(
|
||||
/// TODO
|
||||
// This is reportedly a WMR-specific convenience function for rapid prototyping. Not sure if it's useful for OpenXR.
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user