- Home /
Question by
andrewweitzer · Apr 19, 2017 at 09:29 PM ·
vrplatform-support
How do I retrieve the Virtual Reality Platform being used on start up so I can instantiate the right player prefab to the start scene.
I'm trying to instantiate a VR player prefab depending on what system I am using (Vive or Oculus) . Is there a way where Unity will tell me what platform I am using so I can instantiate a certain player prefab depending what VR platform I am using and also so I don't have multiple player prefabs in the scene for different platforms.
Comment
Answer by BodhiPurplePill · Apr 19, 2017 at 11:59 PM
UnityEngine.VR.VRSettings.loadedDeviceName
Type of VR device that is currently loaded.
As far as i know there is no enum for this, all VR names and devices are in strings
You can get the list of supported device names here