Skip to content

Commit eb00af4

Browse files
committed
Replace SpatialAwarenessSystem -> Service
1 parent 6725581 commit eb00af4

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Assets/MRTK/Providers/Experimental/WindowsSceneUnderstanding/WindowsSceneUnderstandingObserver.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ public void SaveScene(string filenamePrefix)
318318
public void UpdateOnDemand()
319319
{
320320
#if SCENE_UNDERSTANDING_PRESENT
321-
if (!MixedRealityToolkit.Instance.ActiveProfile.IsSpatialAwarenessSystemEnabled || (SpatialAwarenessSystem == null))
321+
if (!MixedRealityToolkit.Instance.ActiveProfile.IsSpatialAwarenessSystemEnabled || (Service == null))
322322
{
323323
return;
324324
}
@@ -369,7 +369,7 @@ public TextAsset SerializedScene
369369
#if SCENE_UNDERSTANDING_PRESENT
370370

371371
#region Other Property
372-
protected virtual GameObject ObservedObjectParent => observedObjectParent != null ? observedObjectParent : (observedObjectParent = SpatialAwarenessSystem?.CreateSpatialAwarenessObservationParent("WindowsMixedRealitySceneUnderstandingObserver"));
372+
protected virtual GameObject ObservedObjectParent => observedObjectParent != null ? observedObjectParent : (observedObjectParent = Service?.CreateSpatialAwarenessObservationParent("WindowsMixedRealitySceneUnderstandingObserver"));
373373
#endregion Other Property
374374

375375
#region Private Fields
@@ -520,7 +520,7 @@ public bool TryFindCentermostPlacement(
520520
protected virtual void SendSceneObjectAdded(SpatialAwarenessSceneObject sceneObj, int id)
521521
{
522522
sceneEventData.Initialize(this, id, sceneObj);
523-
SpatialAwarenessSystem?.HandleEvent(sceneEventData, OnSceneObjectAdded);
523+
Service?.HandleEvent(sceneEventData, OnSceneObjectAdded);
524524
}
525525

526526
/// <summary>
@@ -531,7 +531,7 @@ protected virtual void SendSceneObjectAdded(SpatialAwarenessSceneObject sceneObj
531531
protected virtual void SendSceneObjectUpdated(SpatialAwarenessSceneObject sceneObj, int id)
532532
{
533533
sceneEventData.Initialize(this, id, sceneObj);
534-
SpatialAwarenessSystem?.HandleEvent(sceneEventData, OnSceneObjectUpdated);
534+
Service?.HandleEvent(sceneEventData, OnSceneObjectUpdated);
535535
}
536536

537537
/// <summary>
@@ -541,7 +541,7 @@ protected virtual void SendSceneObjectUpdated(SpatialAwarenessSceneObject sceneO
541541
protected virtual void SendSceneObjectRemoved(int id)
542542
{
543543
sceneEventData.Initialize(this, id, null);
544-
SpatialAwarenessSystem?.HandleEvent(sceneEventData, OnSceneObjectRemoved);
544+
Service?.HandleEvent(sceneEventData, OnSceneObjectRemoved);
545545
}
546546

547547
private async Task<SceneObserverAccessStatus> RequestAccess()
@@ -900,9 +900,8 @@ private SpatialAwarenessSceneObject ConvertSceneObject(SceneObject sceneObject)
900900

901901
System.Numerics.Vector3 worldTranslationSystem;
902902
System.Numerics.Quaternion worldRotationSystem;
903-
System.Numerics.Vector3 localScale;
904903

905-
System.Numerics.Matrix4x4.Decompose(worldTransformMatrix, out localScale, out worldRotationSystem, out worldTranslationSystem);
904+
System.Numerics.Matrix4x4.Decompose(worldTransformMatrix, out _, out worldRotationSystem, out worldTranslationSystem);
906905

907906
int hashedId = sceneObject.Id.GetHashCode();
908907
var result = SpatialAwarenessSceneObject.Create(

0 commit comments

Comments
 (0)