To render videos in Unity we can use a MovieTexture in conjunction with the VideoPlayer component.
- In the Assets/HowToChangeATire/Textures/ folder, create a Render Texture.
- Name it Video Render Texture; we can leave its default settings.
Now for the video player:
- In Hierarchy, create Video | Video Player.
- Check Loop and uncheck Play On Awake.
- Select Aspect Ratio: Fit Vertically.
And link to the texture:
- Drag the VideoRenderTexture onto the Target Texture slot.
- In Hierarchy, select the Video Graphic UI object.
- Drag the VideoRenderTexture onto its Raw ImageTexture slot.