Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Added check for data provider to fix #330 #331

Merged
merged 5 commits into from
Sep 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,13 @@ private void InitializeServiceLocator()
{
foreach (var controllerDataProvider in ActiveProfile.InputSystemProfile.ControllerDataProvidersProfile.RegisteredControllerDataProviders)
{
//If the DataProvider cannot be resolved, this is likely just a configuration / package missmatch. User simply needs to be warned, not errored.
if (controllerDataProvider.DataProviderType.Type == null)
{
Debug.LogWarning($"Could not load the configured provider ({controllerDataProvider.DataProviderName})\n\nThis is most likely because the XRTK UPM package for that provider is currently not registered\nCheck the installed packages in the Unity Package Manager\n\n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't always the case. I'd drop the middle part but leave the last part.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?? It's only a recommendation as to where to look. I'd rather keep the advice there to assist users to figure out how to diagnose warnings raised here

continue;
}

if (!CreateAndRegisterService<IMixedRealityControllerDataProvider>(
controllerDataProvider.DataProviderType,
controllerDataProvider.RuntimePlatform,
Expand Down