Skip to content

Commit

Permalink
[unity] Fix for UpdateWhenInvisible issue introduced in commit 5cb54bd.
Browse files Browse the repository at this point in the history
Closes #1897. See #1883.
  • Loading branch information
HaraldCsaszar committed Jun 1, 2021
1 parent 9bcb5c1 commit 9e94451
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,10 @@ public class SpriteMaskInteractionMaterials {
}

public void OnBecameVisible () {
UpdateMode previousUpdateMode = updateMode;
updateMode = UpdateMode.FullUpdate;
if (previousUpdateMode != UpdateMode.FullUpdate)
LateUpdate(); // OnBecameVisible is called after LateUpdate()
}

public void OnBecameInvisible () {
Expand Down

0 comments on commit 9e94451

Please sign in to comment.