- Home /
Intermittent MovieTexture Audio Track Problem
When I play a movietexture in my scene, sometimes the audio track plays, and sometimes it doesn't.
When it does, it seems to depend on whether I've started playing the video in the inspector before running the game.
This may or may not be related to using videos that are already in ogv (theora) format.
How can I ensure the audio track plays every time?
Answer by jonas-echterhoff · Feb 10, 2010 at 06:02 PM
In order for your movie to play audio, you need to have an AudioSource in the scene, with the movie's AudioClip attached (so that the movies audio can be positioned).
Unity 2.6 introduced a bug related to this, where the new movie preview inspector will create an invisible AudioSource when you preview the movie, and it won't properly dispose it afterwards - which will then lead to movie audio in the game playing through that AudioSource, which is misleading, because users then don't realize that they should create an AudioSource for the movie themselves. This bug will be fixed in the next release of Unity.
Your answer
Follow this Question
Related Questions
WWW.movie doesn't work 1 Answer
I want to play a MovieTexture inside a GUITexture but I can't hear the sound. Why 2 Answers
MovieTexture - Black Video with Audio 0 Answers
Unity 4.1 Movie Texture issue 0 Answers
Movie texture audio: no falloff 3 Answers