File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Assets/MRTK/Providers/XRSDK Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,24 @@ protected virtual bool? IsActiveLoader
52
52
&& XRGeneralSettings . Instance . Manager != null
53
53
&& XRGeneralSettings . Instance . Manager . activeLoader != null )
54
54
{
55
+ if ( ( observersCache == null || observersCache . Count == 0 )
56
+ && Service is IMixedRealityDataProviderAccess spatialAwarenessDataProviderAccess
57
+ && Service is IMixedRealityServiceState spatialAwarenessState
58
+ && spatialAwarenessState . IsInitialized )
59
+ {
60
+ observersCache = spatialAwarenessDataProviderAccess . GetDataProviders < GenericXRSDKSpatialMeshObserver > ( ) ;
61
+ }
62
+
63
+ // Don't report ourselves as active if another observer is handling this platform
64
+ for ( int i = 0 ; i < observersCache ? . Count ; i ++ )
65
+ {
66
+ GenericXRSDKSpatialMeshObserver observer = observersCache [ i ] ;
67
+ if ( observer != this && ( observer . IsActiveLoader ?? false ) )
68
+ {
69
+ return false ;
70
+ }
71
+ }
72
+
55
73
return true ;
56
74
}
57
75
You can’t perform that action at this time.
0 commit comments