Skip to content

Commit d6067e3

Browse files
committed
Prevent creating placement markers when not playing.
1 parent 539607d commit d6067e3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Scripts/ARShowPlacementMarkerOnPlane.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public void ShowPlacementMarkerOnPlane(bool planeVisible, Pose pose, ARPlane pla
125125
private void SetupPlacementMarker()
126126
{
127127

128-
if (!_placementMarker)
128+
if (!_placementMarker || !Application.isPlaying)
129129
{
130130
return;
131131
}
@@ -147,6 +147,11 @@ private void SetupPlacementMarker()
147147
private void CleanupPlacementMarker()
148148
{
149149

150+
if (!Application.isPlaying)
151+
{
152+
return;
153+
}
154+
150155
if (_placementMarker && _placementMarker.scene.IsValid())
151156
{
152157

0 commit comments

Comments
 (0)