D
D
Dmitry Korolev2016-07-01 20:21:17
C++ / C#
Dmitry Korolev, 2016-07-01 20:21:17

What could be the problem with sound playback?

What can cause a bummer in sound reproduction? pastebin.com/kfKNpY2G

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MrDywar Pichugin, 2016-07-01
@adressmoeistranici

1) Don't write b == true, just write (b).
2) GetComponent().PlayOneShot(Fire)
Don't do that, take the component 1 time on Awaik or Start. To understand why, read the full instructions on the site. docs.unity3d.com/ru/current/Manual
3) PlayOneShot can already play the sound, and you ask him to do it again without checking whether he is still playing the previous one or not.
As you read the instructions, learn C# as a language.
https://www.youtube.com/user/CBSystematicsTV/video...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question