Use the Video Player component to play videos (from a URL or video clips) on various surfaces in your sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary.
The Video Player component lets you play video content on different targets, which changes where the video content displays in your scene. To change the video’s target, open the Video Player component and set the Render Mode property to your preferred target.
This page provides details about some of the video targets available:
For more details of the Render Mode property and its options, refer to the Render mode dropdown.
For information about all of the Video Player component’s settings, refer to Video Player component reference. For instructions on how to create the component, refer to Create a Video Player component.
Unity determines the default target when you create the component. If you drop a Video Clip or Video Player component onto a GameObject, the texture of the GameObject’s Renderer becomes the target.
If you drag the Video Clip into the scene, the target is set to the far plane of the scene’s main camera. Otherwise, the VideoPlayer uses the Render Texture render mode.
You can choose to project the video onto the near plane or far plane of the CameraA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary. To enable this setting, set Render Mode to Camera Near Plane or Camera Far Plane.
The near plane shows the video in front of any objects in the scene. Displaying the video on this plane is useful for video cutscenes or UI(User Interface) Allows a user to interact with your application. Unity currently supports three UI systems. More info
See in Glossary elements that need to overlay the scene.
The far plane shows the video in the background of the scene, which is ideal for animated backgrounds.
You can use the Video Player component to attach video files to GameObjectsThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary, and play the video’s content on the GameObject’s TextureAn image used when rendering a GameObject, Sprite, or UI element. Textures are often applied to the surface of a mesh to give it visual detail. More info
See in Glossary at runtime.
When you attach a Video Player component to a GameObject that contains a Renderer component, Unity automatically sets the Material Property of the component to the GameObject’s main Texture.
The following screenshot shows a Video Player component attached to a spherical GameObject. The GameObject has a MeshThe main graphics primitive of Unity. Meshes make up a large part of your 3D worlds. Unity supports triangulated or Quadrangulated polygon meshes. Nurbs, Nurms, Subdiv surfaces must be converted to polygons. More info
See in Glossary Renderer component, so the Video Player automatically assigns it to the Renderer field, which means the video clip plays on the Mesh RendererA mesh component that takes the geometry from the Mesh Filter and renders it at the position defined by the object’s Transform component. More info
See in Glossary’s Texture.
You can use the Video Player to display video content on a Render Texture. This is useful if you want to project your video onto multiple GameObjects or to apply post-processingA process that improves product visuals by applying filters and effects before the image appears on screen. You can use post-processing effects to simulate physical camera and film properties, for example Bloom and Depth of Field. More info post processing, postprocessing, postprocess
See in Glossary effects to the content. For instructions on how to set up and optimize a Render Texture for video, refer to Set up your Render Texture to display video.
When you set Render Mode to API Only, the Video Player component doesn’t automatically assign a target or draw the video content anywhere. Instead, this mode expects you to handle video rendering manually through C# code. Use scripting to access the video frames via the VideoPlayer.texture
property.
This render mode provides the video as a Render Texture or Texture object, which you can dynamically assign to texture fields in your scene through code. This approach is useful because it eliminates the need to create and manage an intermediate Render Texture manually.
With API Only, you can use video content anywhere the Unity API allows you to assign a texture, such as on Raw Image UI elements, or GameObject materials.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.