You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FollowMeToggle has an AutoFollowAtDistance feature which breaks if the FollowMeToggle component is ever disabled and re-enabled. This is because the AutoFollowAtDistance property setter checks if the autoFollowDistanceCheck coroutine instance is null before starting the coroutine. If the instance is not null, the coroutine is not started.
However, in Unity, the fact that a coroutine instance is non-null does not indicate that that coroutine is actually running. If the component is disabled, the coroutine will stop but not become null. When FollowMeToggle is re-enabled, the autoFollowDistanceCheck coroutine is not restarted because the previous instance is non-null, even though it is no longer running.
To reproduce
Steps to reproduce the behavior:
Add a Near Menu to a scene
Select the Near Menu in the scene hierarchy
In the Inspector, find the "Follow Me Toggle" component. Enable "Auto Follow At Distance"
Enable Holographic Remoting for Play Mode (Mixed Reality > Remoting > Holographic Remoting for Play Mode)
Put on the HoloLens and start the Holographic Remoting app
Start the scene in the Unity Editor
Walk away from the Near Menu to verify that the auto-follow behavior works as expected
In the Unity Editor's Inspector, without stopping the scene, disable and re-enable the "Follow Me Toggle" component using the checkbox to the left of the component name
Pin the Near Menu and try walking away from it again. Notice that the auto-follow behavior no longer works.
Expected behavior
"Auto Follow At Distance" behavior will continue to function after disabling and re-enabling the component.
Your setup (please complete the following information)
Unity 2020.3.34f1
MRTK Version 2.7.3.0 (this issue should apply to all versions of MRTK)
Target platform (please complete the following information)
HoloLens 2
The text was updated successfully, but these errors were encountered:
Describe the bug
FollowMeToggle
has anAutoFollowAtDistance
feature which breaks if theFollowMeToggle
component is ever disabled and re-enabled. This is because theAutoFollowAtDistance
property setter checks if theautoFollowDistanceCheck
coroutine instance is null before starting the coroutine. If the instance is not null, the coroutine is not started.However, in Unity, the fact that a coroutine instance is non-null does not indicate that that coroutine is actually running. If the component is disabled, the coroutine will stop but not become null. When
FollowMeToggle
is re-enabled, theautoFollowDistanceCheck
coroutine is not restarted because the previous instance is non-null, even though it is no longer running.To reproduce
Steps to reproduce the behavior:
Expected behavior
"Auto Follow At Distance" behavior will continue to function after disabling and re-enabling the component.
Your setup (please complete the following information)
Target platform (please complete the following information)
The text was updated successfully, but these errors were encountered: