Skip to content

Commit afabf19

Browse files
committed
Late init boundary in case a device is attached later
1 parent b5f4780 commit afabf19

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Assets/MRTK/Core/Services/BaseBoundarySystem.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,16 @@ public override void Initialize()
8282
RaiseBoundaryVisualizationChanged();
8383
}
8484

85+
public override void Update()
86+
{
87+
base.Update();
88+
89+
// If a device is attached late, initialize with the new state of the world
90+
if (!IsInitialized && DeviceUtility.IsPresent)
91+
{
92+
Initialize();
93+
}
94+
}
8595

8696
/// <inheritdoc/>
8797
public override void Destroy()

0 commit comments

Comments
 (0)