Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Rabagast on July 14, 2014, 04:15:15 PM

Title: Audio on a prefab
Post by: Rabagast on July 14, 2014, 04:15:15 PM
Hi!
I have a prefab bullet which shooting on another prefab. Everything is working fine, except the audio. I just discovered that I can't have an audio source on a prefab. It just say "You can't play a disabled audio", so how can I solve this? Is it a way to play an audio clip when to prefabs collides?
Title: Re: Audio on a prefab
Post by: xhidnoda on July 14, 2014, 05:39:44 PM
maybe you can save like game object your audio... (?)
Title: Re: Audio on a prefab
Post by: Rabagast on July 14, 2014, 05:40:50 PM
I think it was because i had destroy self on the same state as the audio. Then it couldn't play the audio. Strange, because it works with objects in the scene.

I hate to work with prefabs I need to destroy, because you can't just destroy a prefab. You need to fine another way. It's always some problems. Wish they could do it more easy.
Title: Re: Audio on a prefab
Post by: Rabagast on July 14, 2014, 05:42:31 PM
Hi, xhidnoda!

What do you mean?
Title: Re: Audio on a prefab
Post by: xhidnoda on July 14, 2014, 05:48:02 PM
i not sure, but, you can Create Game Object (audio) and when you try to play audio you just call the variable...sorry for my english.