I'm working on a Unity VR framework which I'd like to have enable VR for a project as soon as the package is added. I've done some research on how to change the project settings in an editor script, but I can't find this setting anywhere in the files. This setting is found in the editor as:
Edit->Project Settings->Player->XR Settings->Virtual Reality Supported
I tried finding it in the project settings files by opening all of them in Notepad++, changing the setting in the Unity editor, and checking Notepad++ for which file it said had been changed externally. None of them were, so I'm under the impression that this setting in the editor isn't located in the project settings folder, so I have no idea what that little checkbox actually does. How can I enable VR support for the project from code?
Please try
PlayerSettings.virtualRealitySupported = true;
(While I didn't see this in Unity's PlayerSettings docs, I remembered the Oculus VR plugin did similar, so I dug there.)