I’m working on a VR app that supports Vive and Oculus. With Unity 5.3 we could use the native VR support for Oculus and the OpenVR plugin for Vive and our build scripts turn things on and off as appropriate.
Unity 5.4 added a list of “Virtual Reality SDKs” to the Player Settings. These are serialized in ProjectSettings.asset
in a section that looks like this:
vectorPropertyNames:
...
- Standalone::VR::enabledDevices
...
Standalone::VR::enabledDevices:
- Oculus
- OpenVR
Is there a way to change this list through scripting in the editor? There isn’t a named property or field on PlayerSettings and there’s also no mention of vectorPropertyNames
, just SetPropertyBool
etc.
In a pinch I guess I could just have two copies of ProjectSettings.asset and swap them in when I do a build. Thats going to be a pain to maintain, especially if we add Android support and want to do specific Cardboard, GearVR builds too.