Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice
  2. Welcome to the Unity Forums! Please take the time to read our Code of Conduct here to familiarize yourself with the rules and how to post constructively.

  3. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Resolved Determine XR device

Discussion in 'AR' started by JasonC_, Jun 2, 2021.

  1. JasonC_

    JasonC_

    Joined:
    Oct 27, 2019
    Posts:
    43
    Is there a way (XR plugin management 4.0.5, Unity 2020.3.9f1) to determine what the current device is?

    Right now I've been winging it with
    Application.platform
    but that makes a lot of assumptions, and I'm about to add a few more Android devices to the mix that'll break that logic.

    It doesn't necessarily need to be some predefined enum or anything, even just a device name string or anything else that can be used to identify the device model.
     
  2. JasonC_

    JasonC_

    Joined:
    Oct 27, 2019
    Posts:
    43
    Last edited: Jun 2, 2021
  3. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    954
  4. JasonC_

    JasonC_

    Joined:
    Oct 27, 2019
    Posts:
    43
    Thanks; I'll play with the nodes there too. For now
    SystemInfo.deviceModel
    is meeting my requirements, with
    Application.platform
    and
    SystemInfo.deviceType
    as a general fallback in certain cases. I'll publish a list of device model strings I've found somewhere eventually, once I get a collection worth sharing.
     
unityunity