I need to play a fullscreen video, and can’t figure out how to do it with the new GUI system. I tried assigning material to the GUI element, but it doesn’t show in the Camera view. I also tried to use world-view object with assigned video-texture material, but it reduces the video quality dramatically.
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class PlayMovie : MonoBehaviour {
MovieTexture m;
// Use this for initialization
void Start () {
m = (MovieTexture)GetComponent<RawImage> ().texture;
m.Play ();
}
}
If you have sound in your video, it will be parented to your video in your project panel. Just drag it on the RawImage inspector so that it can play accordingly.