ScrollRect with reusable elements

I’m trying to create a scrollable menu system with potentially tens of thousands of clickable buttons, and figure that the best way to do that would be to reuse the button objects as they go off screen and place them at the other end.

My problem, I can’t seem to figure out any decent way of determining when an object is outside of the mask. The button’s position doesn’t seem to change when being scrolled and I can’t use OnBecameInvisible(). Is there any way to do this?

use this one
Loop Scroll Rect