/Engine/Source/Editor/UnrealEd/Classes/Editor/EditorEngine.h
Query to tell if the editor is currently in a mode where it wants XR HMD tracking to be used (like in the VR editor or VR PIE preview).
bool IsHMDTrackingAllowed() const