I have an object with a sound looping on it and when I destroy it I want to finish the current playing of the sound before destroying it but I am not sure how to do this.
Something like this maybe:
audio.loop = false;
Object.Destroy(gameObject, audio.clip.length - audio.time);