Hello,
I have tried to get a video to play in unity but can’t seem to get it to work!
The steps i took;
put a .mov in my assets folder, that didn’t convert to the unity video asset and would not drag onto a material as a texture
put a .mp4 in my assets folder, that did convert to the unity video asset and would drag onto a material as a texture
made a script.
public MovieTexture movTexture;
// Use this for initialization
void Start () {
renderer.material.mainTexture = movTexture;
movTexture.Play();
}
made a plane put the script on it and dragged the texture onto the variable in the editor;
What am i doing wrong, i have watch/read a few tuts and followed everything i can find.
Important points;
unity version 4.5.1f3 pro (free trial),
using a .mp4 file currently,
using c#.
Unity seems to have trouble with certain video files or file formats. One way is to use ffmpeg2theora to manually convert your videos into the format that Unity uses internally for MovieTextures (=.ogv).
One of the advantages: you can play them directly, without the need to import them in Unity or have them processed by Unity.