How should I add my game background music, should I add it as an audio source to my player game object or create an empty game object? If an empty game object how will I ensure its at the same volume throughout the game (not get quieter when the player moves away from the game object)
I put an audio source on the camera itself.
ok thanks, whats the best format for the background music, as im currently using AIF and it keeps crashing the app…
Well, here is the worst part of Unity iPhone. Yet, they didn’t handle the different interruption. Moreover, in my last project I used MP3 for gackground sound but it has a problem. Sometimes it play sometimes not. There is no sequence of it. But I found that, If your game got interruption or press HOME button while loading, next time the MP3 will will not play. At last I used a short range WAV for it. Mind it, you can play only one MP3 at a time.
That can be solved by setting the volume of the clip to 0, doing Play(), waiting a fraction of a second, doing Stop(), setting the volume to the usual and playing again. You can set it so it only does this the first time you try to play music, because it always seems to work after that.
–Eric