感谢原作者提供的思路 原文章链接:https://blog.csdn.net/qq_33994566/article/details/74277012
本文章大神可以略过,供初学者直接参考使用;
话不多说 直接上代码
public class PlayMovie : MonoBehaviour, IPointerClickHandler
{
public MovieTexture[] movies;
RawImage rawimage;
AudioSource audiosource;
AudioClip[] audioclips;
VideoPlayer videoplayer;
int i = 0;
void Start()
{
i = 0;
rawimage = GameObject.Find("RawImage").GetComponent<RawImage>();
audiosource = GameObject.Find("Audio Source").GetComponent<AudioSource>();
movies = new MovieTexture[7];
movies[0] = Resources