Hi I am trying to play a movie texture and it’s appropriate sound at the same time via a GUI button press.
I have managed to get the movie texture to play however the sound does not.
So, I seperated the sound so that the movie texture is just the video no audio,
put the sound on a seperate script and activate two seperate game objects with one script on each: one plays just a movie texture
one plays just the sound
When I play my game and press the GUI button the movie texture plays as it should on a button press however the sound does not, but when I open up Monodevelop to see where I might be going wrong the sound plays so I know it’s working just at the right time.
This doesn’t make any sense to me at all does anyone know how to solve this?
My code below.
using UnityEngine;
using System.Collections;
public class Tutorial_Vids_audio : MonoBehaviour {
//Tutorial audioclips
public AudioClip tutorialAudio_1;
//Play tutorial bool's
public bool Play_tutorialAudio_1;
// Use this for initialization
void Awake ()
{
Play_tutorialAudio_1 = true;
}
void Play_TutorialAudio_1 ()
{
if(Play_tutorialAudio_1)
{
audio.clip = tutorialAudio_1;
audio.Play();
}
}
// Update is called once per frame
void Update ()
{
Play_TutorialAudio_1 ();
}
}