Search Unity

How do I enable/disable XR Plugins from a script?

Discussion in 'AR/VR (XR) Discussion' started by FlightOfOne, Sep 12, 2020.

  1. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    668
    I want to enable the target plugin, depending on what device is being used. E.g. if player has an Oculus I want to enable that. Is this the right way to approach this? How do I go about doing this via code?

    upload_2020-9-12_7-0-37.png
     
    makaka-org, Protozoaire and Reverbing like this.
  2. Avinash_Edverse

    Avinash_Edverse

    Joined:
    May 6, 2023
    Posts:
    1
    I also need the solution for the same, I am creating a build for Phone and Oculus both but instead of 2 builds I want to create a single build which checks the details of the device and enable/disable Oculus plugin accordingly, please let me know the workaround if there is any.
     
  3. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,026
  4. gae25

    gae25

    Joined:
    Nov 13, 2020
    Posts:
    1
    mgear likes this.