- Home /
Video Texture Loop
Hi all!
I'm trying to put a video as a texture on a cube like a tv, with the intention of a repeat loop continuously, but the video only played once.
I use a simple script:
renderer.material.mainTexture.Play ();
but I do not know how to assign parameters to do a loop.
Could anyone help?
Thank you!
Answer by Luckd93 · May 01, 2013 at 05:15 PM
Thanks Luckd93!!
i must add movTexture.loop = true;
nd this is the final scripts that works:
var movTexture : $$anonymous$$ovieTexture; function Start () { movTexture.loop = true; renderer.material.mainTexture = movTexture; movTexture.Play(); }
THAN$$anonymous$$S!
That should have been a comment not an answer.
Read this page : http://answers.unity3d.com/page/newuser.html
Please watch : http://video.unity3d.com/video/7720450/tutorials-using-unity-answers
I guessed that. I posted the comment so that you will avoid doing this next time.
Welcome to Unity Answers :)
Answer by absolutegames1 · Jul 09, 2013 at 05:20 PM
// this line of code will make the Movie Texture begin playing renderer.material.mainTexture.Play(); renderer.material.mainTexture.loop = true;
Your answer
Follow this Question
Related Questions
Video Texture Loop on TV 0 Answers
why cannot build movie texture on android? 4 Answers
how to play video on android 4 Answers
How to loop a video texture in C# 1 Answer
Loop Video forever 2 Answers