Search Unity

Question Switching off XRsettings on the fly.

Discussion in 'XR Interaction Toolkit and Input' started by Ayudat, Oct 16, 2020.

  1. Ayudat

    Ayudat

    Joined:
    Jun 28, 2012
    Posts:
    1
    I am obviously being really dim. For ages I have been scouring the sites around google.
    I recently upgraded to 20.1 and fixed all the issues bar one basic code.

    I cannot turn on and off the XRsettings on the fly. How do you do it now? This is an example of how I did it before:

    if (Input.GetKey("v")){ XRSettings.enabled = true;}
    if (Input.GetKey("c")){ XRSettings.enabled = false;}

    How does it work now?

    Thanks in advance.