- Home /
Mask with Scroll Rect doesn't work for VideoPlayer
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?
I'm still waiting for an answer. can anyone at least give a clue to solve ?
Answer by Din0m1te · Nov 09, 2017 at 12:05 PM
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
Your answer
Follow this Question
Related Questions
Changing a videos frames by using a scrubber 2 Answers
Find rotation between up and two vectors 1 Answer
Sort Vector3[] by clockwise order 2 Answers
Run animation click/touch to move problem 0 Answers
Car Front Tires rotation clamped between 270° - 90° 0 Answers