Best practice for triggered sound effects: on prefab, or on a sound object?
I'm wondering which is the better approach to handling game sound effects in a 2D game, where position doesn't matter:
ie: A playfield with scattered pickups. The player picks up a pickup and a sound plays. Would it be best to:
Attach the sound to the Prefab and trigger the Prefab, telling it "play your sound now" OR
Attach the sound to an empty audio object and when a pickup is triggered, I tell the audio object "play this particular sound now" OR
Attach many sounds to the main player and just trigger the pickup sound when the player collides with that pickup. ?
Thank you.
since you're saying scattered pickups. one soundmanager would be a good choice they you could just tell he should OneShot. makes it easier to change the one sound they all pickups have for picking up. In a case where a unique object(character) needs , probably triggered from animations, I'd put those on him.
Your answer
![](https://koobas.hobune.stream/wayback/20220612074519im_/https://answers.unity.com/themes/thub/images/avi.jpg)