Apply To Material
Sets up a material to display video from the MediaPlayer component. This material can then be used on 3D meshes or other renderers.
Not only is the texture from the video applied, but also certain material keywords and properties are adjusted depending on the requirements to display the video texture. For example on some platforms the video texture is flipped vertically, or in a different colour space, so the shader is required to support these conversions. The AVPro Video shaders support these conversions and used be used in most cases. If you choose to 'resolve' the textures in the MediaPlayer then these adjustments are already made and so any material can be used.
Properties
Property | Function |
---|---|
Media | The MediaPlayer component to apply to the material |
Default Texture | The texture to display during times when there is no video texture to display (eg during video loading) |
Material | The target Material to apply the video texture to |
Texture Property | The name of the Material texture to set. The default texture property depends on the render pipeline used. Standard shaders use _MainTex. URP shaders use _Basemap. HDRP shaders use _BaseColorMap. |
Offset | The normalised X, Y offset to apply to the texture (if shader supports it) |
Scale | The normalised X, Y scale to apply to the texture (if shader supports it) |
Tip
This component can be used to render a video to a material which can then be assigned to the Skybox
component.