- Home /
MovieTexture.isPlaying
I want to use the MovieTexture.isPlaying script to jump to a new level. I am getting the message " an instance of type 'UnityEngine.Movie Texture' is required to access non static member 'isPlaying'"
I have a movie texture and attached the script below to the object with the movie texture. Can someone tell me what this means? Thanks.
renderer.material.mainTexture.Play();
function Update () { if (MovieTexture.isPlaying) { } else { Application.LoadLevel ("home_sc_instant"); } }
Answer by Dreamblur · Jun 24, 2011 at 09:53 PM
First of all, MovieTexture.isPlaying is not a script -- it's a variable in the MovieTexture class. And it's not a static member, which means you can only access it from an instance of the MovieTexture class. So assuming that renderer.material.mainTexture is a MovieTexture, then you what you actually want to be accessing is renderer.material.mainTexture.isPlaying.
Your answer
![](https://koobas.hobune.stream/wayback/20220612120957im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
On movie end 1 Answer
How To Fetch movie Name From URL 0 Answers
How do I play a full screen video? 4 Answers
Using a GUI Movie Texture (making it appear and disappear correctly) 2 Answers
Lag of video loading 1 Answer