|
I want to play sounds from a script that's attached to a prefab. I'm confused because it seems like to do something like this: I have to add an audio source component to the prefab that the script is attached to. There doesn't have to a clip loaded in the audio source, but I definitely have to make an audio source. I need to be able to add several sounds to the script, which is why I'm not just playing audio from the audio source itself.
(comments are locked)
|
|
There are three ways to play a sound: Perfect! That's exactly what I was looking for.
Sep 14 '11 at 12:59 AM
imnickb
(comments are locked)
|
|
Check out PlayClipAtPoint. It does all the creation and clean-up of the audio source for you.
(comments are locked)
|
