Jump to content
Unity Insider Forum

Create alarm in Unity


Max77

Recommended Posts

Hi everyone, I want to know how to create a so-called alarm in Unity. To be more precise, I have a script where the timer counts down. I wrote in the code that if the timer is less than 0f the alarm sound should be played. But it somehow doesn't work. The sound just won't play. Can you please help me. Here's part of the code:

if(timer < 1f)
        {
            Alarm.Play();
            isTimer = false;
        }

 

Link zu diesem Kommentar
Auf anderen Seiten teilen

Archiviert

Dieses Thema ist jetzt archiviert und für weitere Antworten gesperrt.

×
×
  • Neu erstellen...