realitycollective / com.realitytoolkit.core

The all-purpose framework for building the next reality
https://realitytoolkit.realitycollective.net/
MIT License
3 stars 0 forks source link

Fix NRE when no gaze provider is active #14

Closed FejZa closed 2 years ago

FejZa commented 2 years ago

Reality Collective - Reality Toolkit Pull Request

Overview

Fixes an issue where BaseGenericInputSource would cause an NRE when no gaze provider is active in the scene. The change makes sure that we check for gaze provider existence before accessing it.

It also adds a new API to BaseControllerDataProvider to check for the existence of a mapping profile for a certain controller type, without raising an error if none exists. This is useful for custom data provider profiles, where users may decide to not support a controller at all and removed its mapping profile from the data provider configuration.

Changes

See above.

Testing status

Manual testing status

Tested using Pico platform manually, which is where the issue was initially observed.