TV sets, projectors, monitors.... If you want complex animated materials in your level, you can play video files as texture maps. In this recipe, we will learn how to apply a video texture to a cube. We will also implement a simple control scheme that plays or pauses the video whenever that cube is clicked on.
Unity imports video files through Apple Quicktime. If you don't have it installed in your machine, please download it at http://www.apple.com/quicktime/download/.
Also, if you need a video file to follow this recipe, please use the videoTexture.mov
included in the folder 1632_04_08
.
Follow these steps:
Add a cube to the scene through the GameObject | 3D Object | Cube menu.
Import the provided
videoTexture.mov
file.From the Project view, use the Create drop-down menu to create a new Material. Rename it
Video_MAT
and, from the Inspector view, change its Shader to Unlit/Texture:Apply
videoTexture
to the texture slot ofVideo_MAT
by...