# MaterialOverride

> Draw the video content into a user-specified property of the current GameObject's material.

## Definition

* **Type:** Field
* **Namespace:** [UnityEngine.Video](/engine/6000.3/script-reference/unityengine/video.md)
* **Assembly:** UnityEngine.VideoModule

```csharp
MaterialOverride = 3
```

### Remarks

In this mode, the [VideoPlayer](/engine/6000.3/script-reference/unityengine/video/videoplayer.md) writes each decoded frame directly into a texture property of the material on a target [Renderer](/engine/6000.3/script-reference/unityengine/renderer.md). Use this mode to show video on the texture of scene objects such as televisions or computer screens.

* Use [VideoPlayer.targetMaterialRenderer](/engine/6000.3/script-reference/unityengine/video/videoplayer/targetmaterialrenderer.md) to select which [Renderer](/engine/6000.3/script-reference/unityengine/renderer.md) receives the video. If you don't set this property, the [VideoPlayer](/engine/6000.3/script-reference/unityengine/video/videoplayer.md) uses the first [Renderer](/engine/6000.3/script-reference/unityengine/renderer.md) on the same [GameObject](/engine/6000.3/script-reference/unityengine/gameobject.md).
* Use [VideoPlayer.targetMaterialProperty](/engine/6000.3/script-reference/unityengine/video/videoplayer/targetmaterialproperty.md) to choose which texture property the video binds to. If you don't set this property, the [VideoPlayer](/engine/6000.3/script-reference/unityengine/video/videoplayer.md) uses the main texture of the material.

Compared with [VideoRenderMode.RenderTexture](/engine/6000.3/script-reference/unityengine/video/videorendermode/rendertexture.md), this mode doesn't require a [RenderTexture](/engine/6000.3/script-reference/unityengine/rendertexture.md) asset or extra material setup. The video targets the existing material directly.

The video writes into one specific texture property of the material. To show the same video on multiple GameObject instances with this mode, each GameObject needs its own [VideoPlayer](/engine/6000.3/script-reference/unityengine/video/videoplayer.md) or its own material instance. To share a single video across many GameObject instances from one [VideoPlayer](/engine/6000.3/script-reference/unityengine/video/videoplayer.md), use [VideoRenderMode.RenderTexture](/engine/6000.3/script-reference/unityengine/video/videorendermode/rendertexture.md) instead. Assign the same [RenderTexture](/engine/6000.3/script-reference/unityengine/rendertexture.md) to each material that displays the video.
