Skip to content

Commit 24bbf9c

Browse files
author
davidkline-ms
committed
make ObservedObjectParent public via the base class
1 parent 0ce27d8 commit 24bbf9c

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

Assets/MRTK/Core/Providers/BaseSpatialMeshObserver.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,6 @@ protected BaseSpatialMeshObserver(
3232

3333
protected MixedRealitySpatialAwarenessEventData<SpatialAwarenessMeshObject> meshEventData = null;
3434

35-
private GameObject observedObjectParent = null;
36-
37-
/// <summary>
38-
/// The parent GameObject for all observed meshes to be placed under.
39-
/// </summary>
40-
protected virtual GameObject ObservedObjectParent => observedObjectParent != null ? observedObjectParent : (observedObjectParent = Service?.CreateSpatialAwarenessObservationParent(Name));
41-
4235
protected virtual void ReadProfile()
4336
{
4437
if (ConfigurationProfile == null)

Assets/MRTK/Core/Providers/BaseSpatialObserver.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ protected BaseSpatialObserver(
4040
[System.Obsolete("Call Service instead.")]
4141
protected IMixedRealitySpatialAwarenessSystem SpatialAwarenessSystem => Service;
4242

43+
protected GameObject observedObjectParent = null;
44+
45+
/// <summary>
46+
/// The parent GameObject for all observed meshes to be placed under.
47+
/// </summary>
48+
public virtual GameObject ObservedObjectParent => observedObjectParent != null ? observedObjectParent : (observedObjectParent = Service?.CreateSpatialAwarenessObservationParent(Name));
49+
4350
/// <summary>
4451
/// Creates the spatial observer and handles the desired startup behavior.
4552
/// </summary>

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -380,14 +380,9 @@ public TextAsset SerializedScene
380380

381381
#if SCENE_UNDERSTANDING_PRESENT && UNITY_WSA
382382

383-
#region Other Property
384-
protected virtual GameObject ObservedObjectParent => observedObjectParent != null ? observedObjectParent : (observedObjectParent = Service?.CreateSpatialAwarenessObservationParent("WindowsMixedRealitySceneUnderstandingObserver"));
385-
#endregion Other Property
386-
387383
#region Private Fields
388384
private Task task;
389385
private readonly Dictionary<int, SpatialAwarenessSceneObject> sceneObjects = new Dictionary<int, SpatialAwarenessSceneObject>(256);
390-
private GameObject observedObjectParent = null;
391386
private System.Timers.Timer firstUpdateTimer = null;
392387
private System.Timers.Timer updateTimer = null;
393388
private Dictionary<int, Tuple<SceneQuad, SceneObject>> cachedSceneQuads = new Dictionary<int, Tuple<SceneQuad, SceneObject>>(256);

0 commit comments

Comments
 (0)