Skip to content

Conversation

@keveleigh
Copy link
Contributor

Overview

Cherry-picked over two bug-fix PRs that have been merged to main since 2.8.0.

#10620 and #10613

marek-stoj and others added 2 commits May 31, 2022 14:29
microsoft#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 <kurtie@microsoft.com>

Co-authored-by: Kurtis <kurtie@microsoft.com>
@keveleigh keveleigh requested a review from RogPodge May 31, 2022 21:31
@keveleigh keveleigh self-assigned this May 31, 2022
@keveleigh
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@keveleigh keveleigh merged commit 808c439 into microsoft:releases/2.8.1 May 31, 2022
@keveleigh keveleigh deleted the 2.8.1-cherry-picks branch May 31, 2022 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants