- Home /
What to use instead of movie texture in Unity 5 webGL? Is there any workaround?
I've already done some searching but did not find a working example.
jonas echterhoff has some solution but it didn't work for me (I cannot send a message to him)
This is working only on desktop builds. But on WebGL the the problem is with MovieTexture.
using UnityEngine;
using System.Collections;
public class Video : MonoBehaviour {
public MovieTexture movie;
// Use this for initialization
void Start () {
GetComponent<Renderer>().material.mainTexture = movie as MovieTexture;
movie.Play();
}
}
Thank you, but as I said I've already found this. The project is not working. I't brings up errors.
what exactly is not working? cause it is working for me.
EDIT: it is NOT working inside the editor ofc, only once your project is built and online!
If you plan on playing a movie over the whole viewport, you may want to consider running the movie in HT$$anonymous$$L. Could be way easier.
Nerevar! Could you send me your project file with the assets and scene files wich are working?
Answer by ofuscapreto · Aug 14, 2017 at 07:11 AM
You can try this free asset that deploy Movie Textures in WebGL:
https://www.assetstore.unity3d.com/en/#!/content/38369
I tried it but did not work with me... maybe you have better luck
I read a lot of things about WebGL and videos, both in documentation and here in Unity answers... read that WebGL doesn't support video clips, only URL videos... read that the best video format is .webm with VP8 codec... read that WebGL doesn't support Movie Textures... but nothing seems to work... I'm almost giving up with the idea of having video in my web game, because it works fine without videos...
Your answer
Follow this Question
Related Questions
ExternalCall in WebGL not working 0 Answers
360 panorama in Browser, HTCVive, Oculus Rift 0 Answers
Publishing WebGL build 0 Answers
Unity WebGL websocket LLAPI alternatives? 0 Answers
Unity 5.5.4 WebGL always sticks on "Converting managed assemblies to C++" 0 Answers