Greetings,
Given a RectTransform R descended from another RectTransform containing a ScrollRect S (and a corresponding Mask), I’d like to know whether R is visible on the canvas given S’s current scroll position.
Help! And thanks in advance!
Greetings,
Given a RectTransform R descended from another RectTransform containing a ScrollRect S (and a corresponding Mask), I’d like to know whether R is visible on the canvas given S’s current scroll position.
Help! And thanks in advance!
I’ve had a similar issue today, where I had a ScrollRect with UI elements inside of it, and I wanted to trigger a UI animation when a particular UI element became fully visible on screen, which only happens after the user scrolls down a bit. I believe this covers your use case as well.
I posted the code on the forums, so here’s a link (to avoid having multiple copies of it, in case there will be edits): https://forum.unity3d.com/threads/test-if-ui-element-is-visible-on-screen.276549/#post-2978773
Hope this helps