Skip to content

Commit 49a702a

Browse files
committed
SpatialMesh will now display when app starts, but turn off after placing object with TapToPlace when DrawVisualMeshes = true && AllowMeshVisualizationControl = true
1 parent edf5152 commit 49a702a

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

Assets/HoloToolkit/Input/Scripts/Interactions/TapToPlace.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ public class TapToPlace : MonoBehaviour, IInputClickHandler
4141
[Tooltip("Setting this to true will allow this behavior to control the DrawMesh property on the spatial mapping.")]
4242
public bool AllowMeshVisualizationControl = true;
4343

44-
private bool initialMeshVisualizationSetting = false;
45-
4644
private Interpolator interpolator;
4745

4846
/// <summary>
@@ -59,11 +57,6 @@ protected virtual void Start()
5957
ParentGameObjectToPlace = GetParentToPlace();
6058
PlaceParentOnTap = ParentGameObjectToPlace != null;
6159
}
62-
63-
if (SpatialMappingManager.Instance != null && AllowMeshVisualizationControl)
64-
{
65-
initialMeshVisualizationSetting = SpatialMappingManager.Instance.DrawVisualMeshes;
66-
}
6760

6861

6962
interpolator = EnsureInterpolator();
@@ -185,7 +178,7 @@ private void RemoveWorldAnchor()
185178
/// </summary>
186179
private void ToggleSpatialMesh()
187180
{
188-
if (SpatialMappingManager.Instance != null && initialMeshVisualizationSetting == false && AllowMeshVisualizationControl)
181+
if (SpatialMappingManager.Instance != null && AllowMeshVisualizationControl)
189182
{
190183
SpatialMappingManager.Instance.DrawVisualMeshes = IsBeingPlaced;
191184
}

0 commit comments

Comments
 (0)