aiibee
1
hello,
i have been looking for a script that will loop the video. I am learning scripting, please bare with me
here is the code i found
var movieTexture : MovieTexture;
function Start() {
movieTexture.loop = true;
renderer.material.mainTexture = movieTexture;
movieTexture.Play ();
}
but it is not working for me. do i need to change the naming connection.
liszto
2
This must work :
var movieTexture : MovieTexture;
function Start() {
movieTexture.loop = true;
renderer.material.mainTexture = movieTexture;
movieTexture.Play ();
}
Really strange that this doesn’t work for you Oo
did you specify your video in the public field of your script ?! In the Unity inspector ?
// this line of code will make the Movie Texture begin playing
renderer.material.mainTexture.Play();
renderer.material.mainTexture.loop = true;