|
I have a video texture on a primitive cube; attached to that is a PlayMovie-Script with the functions play and stop. The player can play and stop the movie with a mousedownbutton. Everything went well, all the scripts work and the video plays whenever i want to. But when I added the corresponding audioclip to the gameobject (imported with the video of course), something strange happened: the whole video plays with sound, but suddenly at 4 times the speed than it should be. This is the line of code where I start video & audio:
If I disable //audio.Play(); the speed is back to normal. Ideas, anyone?
(comments are locked)
|
|
For all those that share this problem, the issue appears when .play() is called more than once either on video or audio. Make sure you call `.play()` inside an `if (!video.isPlaying)` statement. Here is a script for playing either video or audio with delay and/or via trigger showing how this is done correctly:
(comments are locked)
|
|
seems like it may have been a bug - rebuild the scene, did exactly the same as before, and now it works as it should. just in case anybody else encounters the problem ;)
(comments are locked)
|
