Jump to content
Unity Insider Forum

Create alarm in Unity


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)
            isTimer = false;


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...