A flexible way to work with Video Players is to output their playback to a Render Texture asset file. A Material can be created to get input from the Render Texture, and GameObjects using that Material will display the video. Also, some GameObjects can directly have the Render Texture assigned as their texture.
Do the following:
- In the Project panel, create a new Render Texture asset file named myRenderTexture (menu: Create | Render Texture).
- Select the UI Raw Image in the Hierarchy, and assign its Raw Image (Script) texture property to the myRenderTexture asset file.
- In the Project panel, create a new Material asset file named m_video. For this Material, in the Inspector, set its Albedo ...