Masking GameObject in Canvas

Now, I’ve found that this question crops up in several places, and the answer is never accepted or is some half-working wish-wash way of doing things.
I need to mask several GameObjects that are in a UI ScrollRect. These GameObjects are also animated, have several different sprites, and resize on the go. Thus, due to the additional resizing aspect ratio nature of textured GameObjects, I cannot RenderToTexture, nor would it be optimal for obvious performance reasons.
So I’ll ask the question that many have asked, but for a more complicated situation.
How do I mask a GameObject as if it were a UI element?58028-untitled-1.png

It is very simple, follow the below steps:-

  1. Change the canvas mode to world space.
  2. Create a separate camera to render the Gameobject and then adjust the render area of the camera according to your UI mask.