Hello Everyone,
I have created a GameObject adding the unity new VideoPlayer game component which comes with unity 5.6. But when I include it within a scroll view and when I scroll down it goes beyond the scroll area. It doesn’t get hidden. Can anyone help me to solve this issue?
Hi prasadl,
yes you can do that. Use a render texture.
- In your assets folder create a new asset “Render Texture”
- In your ScrollRect content add a new UI element “Raw Image”
- Assign the raw image the Render Texture you just created
- Add the VideoPlayer component to your object that has the RawImage component on it
- Set the video player render mode to render texture and assign the same render texture there too
- Have a sip of coffee
The video will now render on the texture and get masked out when you scroll.
Cheers
This guy is a hero @FejZa.
THANKS!!!