How to show portions of a video in many different target textures

I’ve an MP4 video and to play it, I’ve created a RawImage with a texture and assigned the same texture to the VideoPlayer’s target texture. So far so good and my video plays as expected.

The next challenge is to split the video into a 3x3 grid and show different portions of the video in each element of the grid. I guess I need to create 9 RawImage objects with the same texture I mentioned above and set the portion of the video to render… Am I right? How do I redirect the VideoPlayer output to those RawImage objects efficiently?

Many thanks.

Seeing as this is using the UGUI system, you should be able to just use the one texture in combination with an image mask to only show particular sections in each instance;

https://docs.unity3d.com/Packages/com.unity.ugui@1.0/manual/script-Mask.html


Imagine we have a raw image with dimensions of 300x300.

alt text

If we add it as a child of a mask with dimensions of 100x100, we get just a single tile that can be moved around freely.

alt text
alt text

If we were to then reposition the child (raw image) within the mask, we can get the mask to cover different areas.

alt text
alt text

Make 9 copies and put them all together and you get a complete image made up of entirely separate tiles.

alt text
alt text