title: Unity Rect Mask 2d overflow
body: <p><a href="https://i.stack.imgur.com/05eXJ.png" rel="nofollow noreferrer">image here</a></p>
  
  <p>I am using a Rect Mask 2d on a scroll bar area to hide elements outside the viewport of the scroll.</p>
  
  <p>And to an extent, this works. the UI element shown in red will not appear until the user scrolls down to it.</p>
  
  <p>However when a UI element is partially within the viewport. The entire element is rendered.
  This is not what I want.</p>
  
  <p>If a UI element cannot be shown entirely in the viewport. id like for the element to either disappear completely or preferably, I would like it so that the portion of the UI element within the viewport is rendered, while the portion outside the viewport isn't.</p>
  
  <p>I have already experimented with a Mask (not Rect Mask 2d) but it seems that they don't like to work with UI elements.</p>
  
  <p>If anyone has any tips or ideas as to how I can solve this. I'd be happy to hear you out.</p>
  
  <p>Thanks in advance</p>