- Home /
This question was
closed May 03, 2013 at 05:27 PM by
AlucardJay for the following reason:
Duplicate Question : http://answers.unity3d.com/questions/449279/video-texture-loop-on-tv.html
Question by
sativarias · May 03, 2013 at 05:09 PM ·
texturevideoreplay
Replay Video Texture
Hi all.
anyone know how to create a script for a video texture is played when clicking with the cursor, and can breed again when finished?
I've used a script and I've tried to apply the loop and stop variables, but do not really know much about scripts, and I do not know what is wrong with it for work without errors.
anyone could help?
I've tried with this script (It works, but the video can be played only once ...):
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();
}
Thank you!
Comment