public void PlaySound(AudioClip clip, Vector3 position) { TheAudioSource.transform.position = position; if (TheAudioSource.clip == null || TheAudioSource.clip.GetHashCode() != clip.GetHashCode()) { TheAudioSource.clip = clip; } TheAudioSource.Play(); }