- Home /
This post has been wikified, any user with enough reputation can edit it.
Question by
GMAlfonso · Oct 29, 2014 at 03:34 AM ·
runtimemovietexturemp4
can I play .mp4 format on MovieTexture at runtime?
I can only play .ogg
IEnumerator LoadVideo() {
directory = "file:///" + Application.dataPath + "/../../" +
DesktopFolderName + "/" + fileName + ".mp4";
WWW www = new WWW(directory);
yield return www;
if (www.error == null || www.error == "")
{
Debug.Log("No Error");
videoTexture = www.movie;
videoTexture.loop = false;
renderer.material.mainTexture = videoTexture;
videoTexture.Play();
} else {
Debug.Log("Error");
}
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613170223im_/https://answers.unity.com/themes/thub/images/avi.jpg)