Http://www.58player.com/blog-2327-952.html
Film Textures (movie Texture)
Note: This is only a professional/advanced feature.
Desktop
A movie texture is an animated texture created from a video file. By placing a video file in the project's resources (Assets) folder, you can import the video so that it is used in exactly the same way you would use a normal texture.
Video files are imported through Apple QuickTime. The supported file types are the types that QuickTime installations can play (typically. mov,. mpg,. mpeg,. mp4,. avi,. asf). On Windows, movie import requires the installation of Quicktime (download here).
Property
The movie Texture Viewer (Inspector) is very similar to the normal texture viewer (Inspector).
Video files are movie textures in Unity
Property:
Function:
Anisotropy (Aniso level)
Improves texture quality when viewing textures at a steep angle. Suitable for flooring and ground textures
Filter modes (Filtering mode)
The filtering method of selecting texture when stretching by three-dimensional transformation
Loops (Loop)
If enabled, the movie will loop after it finishes playing
Quality (Quality)
Ogg Theora Video file compression rate. Higher values mean higher quality, but larger file size
More information
When you add a video file to your project, it is automatically imported and converted to OGG Theora format. After the movie texture is imported, it can be attached to any game object (Gameobject) or material, just like a normal texture.
Play a movie
Movie textures do not play automatically when the game starts to run. You must use a short script to tell when it will play.
This line of code causes the movie texture to start playing
Renderer.material.mainTexture.Play ();
Attach the following script to toggle movie playback When the SPACEBAR is pressed:
function Update () {
if (Input.getbuttondown ("Jump")) {
if (renderer.material.mainTexture.isPlaying) {
Renderer.material.mainTexture.Pause ();
}
else {
Renderer.material.mainTexture.Play ();
}
}
}
For more information on playing movie textures, see the movie Texture Script reference page
Movie Audio
When you import a movie texture, the audio tracks that accompany the video are also imported. This audio is displayed as an audio fragment (AudioClip) child of the movie texture.
Audio tracks for video are displayed as children of the movie texture in Project view
To play this audio, you must attach the audio clip to the game object (Gameobject), just like any other audio clip. Drag the audio clip from the project view to the scene or to any game object (Gameobject) in the Hierarchy view (*. Typically, this is the same game object (Gameobject) that shows the movie. Then use audio. Play () causes the movie's audio track to play with its video.
Ios
Movie textures are not supported on IOS. Instead, use Handheld.playfullscreenmovie to provide full-screen streaming playback.
You need to save the video in a streaming resource (streamingassets) folder located in the project directory.
Unity IOS supports any movie file type that can play correctly on IOS devices, that is, the file extension. mov,. mp4,. MPV, and. 3GP, and use one of the following compression criteria:
H. 3.0 Baseline Profile Level video
MPEG-4 Part 2nd Video
For more information about the supported compression standards, see the IPhone Sdkmpmovieplayercontroller class reference.
After you call Iphoneutils.playmovie or Iphoneutils.playmovieurl, the screen immediately changes from the current content to the specified background color. It may take a while for the movie to be ready for playback, but at the same time the player will continue to show the background color and the progress indicator may be displayed to let users know that the movie is loading. When playback is complete, the screen changes back to your content.
Video Player cannot switch to mute during video playback
As mentioned above, video files are played using Apple's embedded player (from SDK 3.2 and IPhone OS 3.1.2 and earlier). It contains a bug that prevents Unity from switching to mute.
Video player does not consider device orientation
The Apple video player and IPhone SDK do not provide a way to adjust the video orientation. A common scenario is to manually create two copies of each movie in both horizontal and vertical directions. You can then determine the device orientation before playing, allowing you to select the correct movie version.
Android (Android)
Movie textures are not supported on Android (Android). Instead, use Handheld.playfullscreenmovie to provide full-screen streaming playback.
You need to save the video in a streaming resource (streamingassets) folder located in the project directory.
Unity Android supports any movie file type supported by Android (i.e. file extension. mp4 and. 3gp) and uses one of the following compression criteria:
H.263
H. AVC
MPEG-4 SP
However, device vendors are committed to expanding this list, so some Android devices can play formats other than those listed, such as HD video.
For more information about the supported compression standards, see the Android SDK Core Media Format documentation.
After you call Iphoneutils.playmovie or Iphoneutils.playmovieurl, the screen immediately changes from the current content to the specified background color. It may take some time for the movie to be ready for playback. At the same time, the player continues to display the background color, and a progress indicator may be displayed to let the user know that the movie is loading. When playback is complete, the screen changes back to your content.
This article by Game Bull Unity3d Forum finishing recommended Unity3d game http://www.unitymanual.com/forum76.html Unity3d model http://www.unitymanual.com/ Forum-model-1.html
Unity3d User Manual User Guide film textures (movie Texture)