Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: greg on March 06, 2013, 10:18:16 AM

Title: Audio one shot
Post by: greg on March 06, 2013, 10:18:16 AM
"play random audio" creates a "one shot audio" element, each time its used, and they dont get destroyed.

Am i right in assuming this is bad practice, and its better just to roll a random number, then play a relevant audio clip on the existing object (which already has an audio source component)?

just asking for confirmation, couldn't find answers via google.
Title: Re: Audio one shot
Post by: Alex Chouls on March 11, 2013, 01:13:22 AM
Sounds like it could be a bug in Play Random Audio - I'll look into it...
Title: Re: Audio one shot
Post by: jeanfabre on June 17, 2013, 06:55:58 AM
Hi,

 I can't replicate this. Do you have a repro scene? the call made within the custom action doesn't return a reference to the created gameObject that plays the audio and the unity doc is clear on this as well, it should get cleaned up automatically by unity.

bye,

 Jean