I’m making a audio clip to play whenever you get “scared” in the game I am creating. I am using
if (SanityEffect.currentSanity >= 20)
{
mBlur.enabled = true;
mBlur.blurAmount = 0.2f;
GetComponent.<AudioSource>().clip = BreathingCalm;
}
to call the effects and the sound. I repeat this for a few more lines, replacing 20 with 40, 60 and so forth. The sound changes every time the value changes. I am getting an ‘Unknown Identifier’ error, with BreathingCalm (my sound file) as the error. I set variables up top using
var BreathingCalm : AudioClip;
for every sound file I had. Anyone tell me why it is giving me this error? Thanks guys!