Hello again everyone.
I’m having some rough times with this video. It works fine when it is just attached to one object. The second I attach it to a second object everything changes. When I click on the first object the sound will play but the texture will now show up. Same thing happens for the second object. But when I take off the component for the second object everything works beautifully on the first. Is there any reason that simply adding a script to a second object will interfere like that? Script follows:
var movieClip : MovieTexture;
var movieTexture : GameObject;
var audioSound : AudioClip;
function Start()
{
movieTexture.active = false;
}
function OnMouseUp()
{
movieTexture.active = true;
movieTexture.renderer.material.mainTexture = movieClip;
movieClip.Play();
audio.Play();
}
function Update()
{
if(audio.isPlaying)
{
Debug.Log("Audio is playing");
}
else
{
movieTexture.active = false;
}
}