Max77 Geschrieben 13. Oktober 2021 Melden Share Geschrieben 13. Oktober 2021 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 More sharing options...
Sascha Geschrieben 13. Oktober 2021 Melden Share Geschrieben 13. Oktober 2021 What is an alarm? Is that a thing in your game? Do you have a thing connected to your machine? Have you defined that somewhere? You can't expect Unity to know what you mean without defining it somewhere. Link zu diesem Kommentar Auf anderen Seiten teilen More sharing options...
Max77 Geschrieben 14. Oktober 2021 Autor Melden Share Geschrieben 14. Oktober 2021 I have solved the problem long ago Link zu diesem Kommentar Auf anderen Seiten teilen More sharing options...
Sascha Geschrieben 15. Oktober 2021 Melden Share Geschrieben 15. Oktober 2021 Then why did you ask about it just 2 days ago? This is the dumbest thread I've seen in here for quite some time... Link zu diesem Kommentar Auf anderen Seiten teilen More sharing options...
Max77 Geschrieben 16. Oktober 2021 Autor Melden Share Geschrieben 16. Oktober 2021 My question was actually how to play a sound after a certain time, but I solved the problem before when you wrote an answer. Have a nice day... Link zu diesem Kommentar Auf anderen Seiten teilen More sharing options...
Sascha Geschrieben 16. Oktober 2021 Melden Share Geschrieben 16. Oktober 2021 Now that makes more sense, thank you Link zu diesem Kommentar Auf anderen Seiten teilen More sharing options...
Recommended Posts
Archiviert
Dieses Thema ist jetzt archiviert und für weitere Antworten gesperrt.