Skip to content

Commit

Permalink
remove scrolling text from being a raycast target
Browse files Browse the repository at this point in the history
- explanation for why in the code comment
  • Loading branch information
chrislee0419 committed Nov 2, 2020
1 parent 8edc4f6 commit ff1b8bf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions BeatSaberMarkupLanguage/Components/ScrollingText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ private void Awake()
rt.pivot = new Vector2(0.5f, 0.5f);
rt.sizeDelta = Vector2.zero;

// the text object can be hit by the raycast, even when it is masked off
// i'm guessing it has something to do with how the text is now curved
// in any case, disallow the text to be a raycast target so it doesn't cover other UI elements
textComponent.raycastTarget = false;

// allow animation to restart when text has changed
textComponent.RegisterDirtyLayoutCallback(OnTextComponentDirtyLayout);
}
Expand Down

0 comments on commit ff1b8bf

Please sign in to comment.