Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Podden's avatar
Podden
Protege
11 years ago

Detecting Headset Type

I did not found any function or variable to handle DK1 or DK2 different. Am I missing something? I want to scale my GUI a little smaller for DK2 because it's much better readable in it and does not have to be so big.


Edit: just helped myself!
I put this inside the OVRDevice.cs, unter the IsSensorPresent()-function.


public static OVR.ovrHmdType GetHmdType()
{
if (HMD == null || !SupportedPlatform)
return OVR.ovrHmdType.ovrHmd_None;
ovrHmdDesc desc = HMD.GetDesc();
return desc.Type;
}


Than you can call it in your scripts (do not forget "using OVR;" so that it recognises the ovrHmdType enumeration.
Replies have been turned off for this discussion