- Home /
Video Texture Loop on TV
Hi All!
I'm trying to create an audiovisual room. I've put a TV with a video texture and I've used this script:
function OnMouseDown () {
if (renderer.material.mainTexture.isPlaying) {
renderer.material.mainTexture.Pause ();
}
else {
renderer.material.mainTexture.Play ();
}
}
var movTexture: MovieTexture;
function Start () {
movTexture.loop = true;
renderer.material.mainTexture = movTexture;
movTexture.Play ();
}
when pressed with the cursor on the TV, the video starts, but when it ends, you can not replay again.
Anyone know what could be the problem in the script? I'm not very expert...
Thanks!!
you have to set the movieTexture.loop boolean to true.
http://docs.unity3d.com/Documentation/ScriptReference/$$anonymous$$ovieTexture-loop.html
before any question think to check scriptreference there is many answers
then, must I change "movTexture.loop = true;" with "movieTexture.loop = true;"? now i can´t try it, this afternoon i wil try. thanks!
i don´t know very well scripts. How must I use loop in script without errors?
Your answer
Follow this Question
Related Questions
Video Texture Loop 2 Answers
Replay Video Texture 0 Answers
How to loop a video texture in C# 1 Answer
Loop Video forever 2 Answers
Switch texture script malfunction 1 Answer