Description

UHeadMountedDisplayFunctionLibrary::GetHMDDeviceName()  says it returns the "device" you are using, but it really returns the name of the SDK or XR System that you are using (for example launching on Oculus device through SteamVR SDK, it will return SteamVR).

You can see that it is calling a function "GetSystemName" under the hood:

 

FName UHeadMountedDisplayFunctionLibrary::GetHMDDeviceName()
{
 FName DeviceName(NAME_None);
if (GEngine->XRSystem.IsValid())
 {
 DeviceName = GEngine->XRSystem->GetSystemName();
 }
return DeviceName;
}

 

 

Steps to Reproduce
  1. Read comment on function UHeadMountedDisplayFunctionLibrary::GetHMDDeviceName() that says "Returns the name of the device, so scripts can modify their behaviour appropriately"
  2. Launch on SteamVR with Oculus connected, notice that GetHMDDeviceName returns SteamVR even though using Oculus device

 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-59783 in the post.

5
Login to Vote

Won't Fix
ComponentUE - Platform - XR
Affects Versions4.20
Target Fix4.27
CreatedMay 30, 2018
ResolvedJan 27, 2021
UpdatedOct 13, 2021