- Home /
Is there a way to know the percentage or even the time a movie texture is running?
Let's say I have a movie texture and I want some event to happen when it reach a point, how can I know the percent or time of a movie texture or audio clip?
Thank you guys, but I was thinking of something more..... built in, come on, it is a very basic feature and actually the data is there, inside unity3d, otherwise the sound/movieclip wouldn't be playing. I just don't belive there isn't anything built in about this.
That doesn't exist, i'm simply providing you with an alternative. Also please do not create an answer to your question if it's not an answer.
Answer by nicolasjr · Apr 11, 2014 at 03:44 PM
Following the above comment logic, you can create it based on a specific percentage:
Invoke("DoStuff", movie.duration * 0.2f) //for 20%
Answer by MikeNewall · Apr 11, 2014 at 03:27 PM
That ^^
Or if you know how many seconds into the clip you want to call your code use the invoke function when you start playing the movie:
Invoke("DoStuff", 2);