Skip to content

Instantly share code, notes, and snippets.

@codenamejason
Created December 20, 2016 00:34
Show Gist options
  • Save codenamejason/0265dafd1df251ed12c9549d3bdc7f5b to your computer and use it in GitHub Desktop.
Save codenamejason/0265dafd1df251ed12c9549d3bdc7f5b to your computer and use it in GitHub Desktop.
public class ToggleVR : MonoBehavior
{
// Toggle VR settings.
private void Update ()
{
// If V is pressed, VRSettings.enabled
if(Input.GetKeyDown(KeyCode.V))
{
VRSettings.enabled = !VRSettings.enabled;
Debug.Log("Changed VRSettings.enabled to: " + VRSettings.enabled);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment