Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix FollowMeToggle's auto-follow breaking if the component is disabled (
#10620) * Fix FollowMeToggle's auto-follow breaking if the component is ever disabled `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 is null before starting the coroutine. If the component is disabled, the coroutine will _stop_ but not become null. When the component is re-enabled, the coroutine does not start again because the previous instance is non-null, even though it is no longer running. This is fixed by simply setting `autoFollowDistanceCheck` to null in `OnDisable()`. * FollowMeToggle: formatting tweak Per keveleigh Co-authored-by: Kurtis <[email protected]> Co-authored-by: Kurtis <[email protected]>
- Loading branch information