Question by
JonSnowMF · Jun 10, 2017 at 07:57 AM ·
loopmovietexturevideotextureloopingmovie texture
My Movie Texture does not loop, why ?
Hi, I've seen all the forum topics on this subject but in my case the situation is a little bit different (i guess), because I did what the answers of other topics say and didn't work. I don't know what to do :(
I have a Raw Image in canvas that has the script of the MovieTexture. The video works fine (and music of the clip) but the MovieTexture "Loop" isn't working, the video doesn't loop :(
If someone helps me, I would be very grateful :)
P.S: i have the " using UnityEngine.UI; " in script
My script is:
public class PlayMovie : MonoBehaviour {
public MovieTexture movie;
private AudioSource sound;
public AudioClip music;
void Start () {
GetComponent<RawImage>().texture = movie as MovieTexture;
sound = GetComponent<AudioSource>();
sound.clip = music;
movie.loop = true;
movie.Play();
sound.Play();
}
}
Comment