|
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"); } }
(comments are locked)
|
|
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.
(comments are locked)
|
