How to loop a video texture in C#

Im still new to C# programming I am familiar to all the types of loops but I am stumped on how to implement it in Unity here is what I have so far.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class NewBehaviourScript : MonoBehaviour {

	public MovieTexture movie;

	// Use this for initialization
	void Start ()
			GetComponent< RawImage> ().texture = movie as MovieTexture;
			movie.Play ();

	// Update is called once per frame
	void Update ()



AFAIK you don’t actually need to- just check the “loop” box in the inspector when the MovieTexture is selected, and it should loop. If you need to do this programmatically for some reason, then movie.Loop = true; should work. I suppose if you want to loop it in one instance, without looping it for all of them, then just put something like if(!movie.isPlaying) movie.Play(); in the Update function.