Skip to content

Instantly share code, notes, and snippets.

@reidblomquist
Created June 26, 2015 05:36
Show Gist options
  • Save reidblomquist/45033dd6bf81ea3b658e to your computer and use it in GitHub Desktop.
Save reidblomquist/45033dd6bf81ea3b658e to your computer and use it in GitHub Desktop.
Unity3d UI Raw Image Video
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class GuiVideo : MonoBehaviour {
void Start() {
MovieTexture movie = GetComponent<RawImage>().texture as MovieTexture;
AudioSource sound = GetComponent<AudioSource>();
sound.clip = movie.audioClip;
movie.Play();
sound.Play();
}
}
@ajnaduvil
Copy link

thank you for sharing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment