Skip to content

Commit 77886ce

Browse files
committed
Unfilter new data providers
1 parent 39d319a commit 77886ce

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Assets/MRTK/Core/Inspectors/Profiles/DataProviderAccessServiceInspector.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ protected class ServiceConfigurationProperties
4949
private static readonly GUIContent ComponentTypeLabel = new GUIContent("Type");
5050
private static readonly GUIContent SupportedPlatformsLabel = new GUIContent("Supported Platform(s)");
5151

52+
private const string NewDataProvider = "New data provider";
53+
5254
/// <inheritdoc/>
5355
protected override void OnEnable()
5456
{
@@ -72,7 +74,7 @@ protected virtual void AddDataProvider()
7274
SerializedProperty provider = providerConfigurations.GetArrayElementAtIndex(providerConfigurations.arraySize - 1);
7375

7476
ServiceConfigurationProperties providerProperties = GetDataProviderConfigurationProperties(provider);
75-
providerProperties.componentName.stringValue = $"New data provider {providerConfigurations.arraySize - 1}";
77+
providerProperties.componentName.stringValue = $"{NewDataProvider} {providerConfigurations.arraySize - 1}";
7678
providerProperties.runtimePlatform.intValue = -1;
7779
providerProperties.providerProfile.objectReferenceValue = null;
7880

@@ -162,7 +164,8 @@ protected bool RenderDataProviderEntry(int index, GUIContent removeContent, Syst
162164

163165
var serviceType = GetDataProviderConfiguration(index).ComponentType;
164166

165-
if (serviceType?.Type == null && !MixedRealityProjectPreferences.ShowNullDataProviders)
167+
// Don't hide new data providers added via the UI, otherwise there's no easy way to change their type
168+
if (serviceType?.Type == null && !MixedRealityProjectPreferences.ShowNullDataProviders && !providerProperties.componentName.stringValue.StartsWith(NewDataProvider))
166169
{
167170
return false;
168171
}

0 commit comments

Comments
 (0)