The XRDevice properties that differ between Unity versions due to
elements being made obsolete were originally included directly in
the XRDevicePatternMatcher component. But this logic is useful in
more places so it has been abstracted out into a Utility class that
is static so it can be called from any other component requiring
this abstraction.
It also includes the checks for IsTracked, BatteryLevel, Manufacturer
(even though they only work on Unity 2019.3 and above).
The XRDevicePatternMatcher can also now specify which device node
to look up the details for as on Unity 2019.3 and above the device
can be specified in the look up. This does not work on versions
prior to Unity 2019.3.
The XRDevice properties that differ between Unity versions due to elements being made obsolete were originally included directly in the XRDevicePatternMatcher component. But this logic is useful in more places so it has been abstracted out into a Utility class that is static so it can be called from any other component requiring this abstraction.
It also includes the checks for IsTracked, BatteryLevel, Manufacturer (even though they only work on Unity 2019.3 and above).
The XRDevicePatternMatcher can also now specify which device node to look up the details for as on Unity 2019.3 and above the device can be specified in the look up. This does not work on versions prior to Unity 2019.3.