ExtendRealityLtd / Zinnia.Unity

A collection of design patterns for solving common problems.
http://vrtk.io
MIT License
319 stars 38 forks source link

feat(Utility): abstract XRDevice queries to static class #554

Closed thestonefox closed 2 years ago

thestonefox commented 2 years ago

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.

ExtendReality-Bot commented 2 years ago

:tada: This PR is included in version 1.42.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: