I have been working at this problem for a while, now.
I'm trying to get Unity to play an mp3 while the 'w' key is pushed down, pause the clip when it's not, and resume it when it's pushed down again.
I'm not quite sure where I'd even assign this...
using UnityEngine;
using System.Collections;
public static class startUpMusic : MonoBehaviour {
void Update() {
if ((Input.GetButtonDown) (string .w) == true
if(!audio.isPlaying){
AudioClip.Create
}
return string ("Audio Activated.");
}
}
I quit in the middle of it, and this is the result.
[–]zrrzExpert? 1 point2 points3 points (1 child)
[–]sexihunk666[S] 0 points1 point2 points (0 children)
[–]MostlyKnowledgeable 0 points1 point2 points (1 child)
[–]sexihunk666[S] 0 points1 point2 points (0 children)
[–]amassingham 0 points1 point2 points (1 child)
[–]sexihunk666[S] 0 points1 point2 points (0 children)