Should I be using this method if I have a static screen where the audio is at the same level all the time? From my understanding, you should only use this if the game object might be destroyed before the audio completes. In that case, when the camera is moving and you want the audio to always be the same volume regardless of where you are, and you want to make sure the audio plays in full even if the game object is destroyed, which method do you use?
Bump
You can make one gameobject prefab with the AudioSource. Then spawn it instead of the PlayClipAtPoint and make it the child from the camera. As bonus you will have better controlle over the audioPlayer.
And if you have many “audio” prefabs to spawn then you can use object pooling.
As example:
public GameObject soundPlayer;
GameObject aPlayer;
AudioSource aSource;
void Awake()
{
aPlayer = Instantiate(soundPlayer, transform.position, transform.rotation);
aSource = aPlayer.GetComponent<AudioSource>();
//and now you can do all things what you want with the audio player
//move it
//aPlayer.transform.position = other.transform.position;
//change volume
//aSource.volume = volume;
//play it
//aSource.Play();
//make it child
//camera.transform.parent = aPlayer.transform;
//and what ever.....
}