If I Play the gun sound on my "bullet" object, how can I prevent the end of Audio sound if the bullet hit something so it destroy. To clarify:
Bullet prefab -> Audio Source -> Audio Clip = MachineGun.mp3 PlayOnAwake = true
When I instantiate bullet, MachineGun AudioClip is played. But the bullet is fast and hit something before the clip is end. This Kill the machine audio effect making it irrealistic.
How can I tell Unity "Play the sound to the end, despite the object is destroyed".
I've tried
Destroy(gameObject, AudioClip.length)
But it seems not works