Aspect Ration of Video Player not changing
Hello, i want to play a video using the VideoPlayer Component on a quad. The problem is, the video always scales to the size of the quad and i wan't to crop it. I tried using
this.GetComponent().aspectRatio = UnityEngine.Video.VideoAspectRatio.NoScaling;
but it doesn't do anything. I could really use some help, thank you.
Answer by thomasfdm_sky · Nov 24, 2020 at 10:12 PM
Hey!
Just had this come up for me, finally found it (in case anyone stumbles across this later). If you're using a Render Texture to apply the video to, make sure you've changed the size of that render texture, as by default it'll stay at whatever size you set it to originally. The video player only knows what the size of that texture is and so will use that for the scaling, not the actual renderer that that texture ends up being applied to (because you could apply it to more than one thing of any different size).
Hope that helps anyone!
So this is manual mode. Is there a way using Render Texture to automatically set correct aspect ratio? (e.g. when changing videos in Runtime). Dynamic Scaling checkbox on Render Texture doesn't work.
Your answer
