Search Unity

Resolved Determine XR device

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

  1. JasonC_

    JasonC_

    Joined:
    Oct 27, 2019
    Posts:
    66
    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:
    66
    Last edited: Jun 2, 2021
  3. joejo

    joejo

    Unity Technologies

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

    JasonC_

    Joined:
    Oct 27, 2019
    Posts:
    66
    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.
     
  5. Fangh

    Fangh

    Joined:
    Apr 19, 2013
    Posts:
    274
    Do you have the list ?