Create a Video Player component
MovieTexture から VideoPlayer への移行
Set up your Render Texture to display video
Use a Render Texture to display your video content on the surface of multiple GameObjects that share the Render Texture or to apply post-processing effects to the video.
To display your video content on a Render Texture:
-
Prepare your Render Texture for video.
-
Set a Render Texture as your Video Player’s target.
Prepare your Render Texture for video
To optimize your Render Texture for use with video content:
- Click on your Render Texture to open the Inspector window.
- Make sure the resolution of the Render Texture matches the resolution of your video content.
- Set Anti-aliasing to None.
- Set Color Format to R8G8B8A8_UNORM. If you notice excessive banding with your Render Texture, particularly in dark areas where the color transitions look unnatural, set Color Format to R16G16B16A16_UNORM.
- Set Depth Stencil Format to None.
- Disable Mipmap.
- Set Wrap Mode to Clamp.
- Set Filter Mode to Point.
- Disable anisotropic filtering via script:
renderTexture.anisoLevel = 0;
When done, your Render Texture is ready for your video content.
Set a Render Texture as your Video Player’s target
To have your video play on your Render Texture, you need to set up your Video Player component to target your Render Texture:
- Click on the GameObject that contains the Video Player component. The Inspector window opens.
- Set Render Mode to Render Texture.
- Assign your Render Texture to Target Texture.
Your Video Player component now targets your optimized Render Texture.
Additional resources
Create a Video Player component
MovieTexture から VideoPlayer への移行