playMaker

Author Topic: Audio one shot  (Read 2491 times)

greg

  • Junior Playmaker
  • **
  • Posts: 68
Audio one shot
« 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.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Audio one shot
« Reply #1 on: March 11, 2013, 01:13:22 AM »
Sounds like it could be a bug in Play Random Audio - I'll look into it...

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Audio one shot
« Reply #2 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