Im really new to programming in unity javascript.
So I want that when I look at a object it makes a sound, and when I take the mouse away from it, it makes no sound.
I have a script made which does what I want but just the opposet, so could someone help me?
function OnMouseEnter() {
audio.Stop();
}
function OnMouseExit() {
audio.Play();
}