You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
This should saves around ~1.5 Mb to ~3 Mb at runtime with ~50000 packages Added a new core define UE_STRIP_DEPRECATED_PROPERTIES that could be used to wrap deprecated properties and strip them to regain memory when a projects becomes compliant. this can be set in the project target file Deprecated most public properties from UPackage and created accessors for them #rb PJ.Kack #jira UE-138957 #preflight 61f17a6f7266f4e79bd62601 #ROBOMERGE-AUTHOR: francis.hurteau #ROBOMERGE-SOURCE: CL 18738937 in //UE5/Release-5.0/... via CL 18739524 via CL 18741373 #ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472) [CL 18742135 by francis hurteau in ue5-main branch]
36 lines
1.2 KiB
C++
36 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "IXRTrackingSystem.h"
|
|
#include "IHeadMountedDisplay.h"
|
|
#include "EngineGlobals.h"
|
|
#include "Engine/Engine.h"
|
|
#include "Kismet/GameplayStatics.h"
|
|
|
|
void IXRTrackingSystem::GetHMDData(UObject* WorldContext, FXRHMDData& HMDData)
|
|
{
|
|
HMDData.bValid = true;
|
|
HMDData.DeviceName = GetHMDDevice() ? GetHMDDevice()->GetHMDName() : GetSystemName();
|
|
HMDData.ApplicationInstanceID = FApp::GetInstanceId();
|
|
|
|
bool bIsTracking = IsTracking(IXRTrackingSystem::HMDDeviceId);
|
|
HMDData.TrackingStatus = bIsTracking ? ETrackingStatus::Tracked : ETrackingStatus::NotTracked;
|
|
|
|
APlayerCameraManager* CameraManager = UGameplayStatics::GetPlayerCameraManager(WorldContext, 0);
|
|
if (CameraManager)
|
|
{
|
|
HMDData.Rotation = CameraManager->GetCameraRotation().Quaternion();
|
|
HMDData.Position = CameraManager->GetCameraLocation();
|
|
}
|
|
//GetCurrentPose(0, HMDVisualizationData.Rotation, HMDVisualizationData.Position);
|
|
}
|
|
|
|
bool IXRTrackingSystem::IsHeadTrackingAllowedForWorld(UWorld& World) const
|
|
{
|
|
#if WITH_EDITOR
|
|
// For VR PIE only the first instance uses the headset
|
|
return IsHeadTrackingAllowed() && ((World.WorldType != EWorldType::PIE) || (World.GetOutermost()->GetPIEInstanceID() == 0));
|
|
#else
|
|
return IsHeadTrackingAllowed();
|
|
#endif
|
|
}
|