x


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"); } }

more ▼

asked Jun 24 '11 at 09:42 PM

JJR gravatar image

JJR
16 2 3 3

(comments are locked)
10|3000 characters needed characters left

2 answers: sort newest

thanks, this gives me a start

more ▼

answered Jun 24 '11 at 10:06 PM

JJ_R gravatar image

JJ_R
1

(comments are locked)
10|3000 characters needed characters left

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.

more ▼

answered Jun 24 '11 at 09:53 PM

Dreamblur gravatar image

Dreamblur
703 9 16 22

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x113
x2

asked: Jun 24 '11 at 09:42 PM

Seen: 745 times

Last Updated: Jun 24 '11 at 10:06 PM