So we've got the audio listener on the camera and let's go ahead and
add a sound for the sun.
So if I go ahead and look at the Sounds folder,
you can see that I've got a burning sound.
So let me select that.
And over here in the inspector we can actually preview it.
[SOUND] So
it basically just sounds like something burning.
Once again, there's many different ways of doing things.
I always like shortcuts, so we can basically take that burning sound,
drag and drop it right onto the Sun gameObject, and if I go back to the sun,
we can see now it's got a audio source attached to it.
The audio source component actually has several properties,
one of those being loop.
So we want this sound to continually play.
If we don't select loop, it'll basically play the few seconds of the sound clip,
and then end.
But we want it to continually play, so I'm gonna go ahead and check that.
So let's go ahead and play.
[SOUND] So as we're playing, we can adjust things.
So another property is the volume.
So the volume is set at 1.
Let me pull it down to 0.3 or something like that.
So that's like a 30%, 0.3.
And we can jut barely hear the sun burning, or
maybe we can increase that a little bit to 0.5, for example.
Now once again, I'm in play mode so any change that I make is not gonna stick.
It's just for, you know, essentially testing purposes and
trying to figure out what I actually want.
So now that I have what I want, I could stop it, go in here for
volume and change this to 0.5.
Let's also add a sound to the Earth.
For purposes of example, I can select the Earth.
I can go to component.
Move down to audio and add an audio source.
This is the sort of manual way of doing it.
Dragging and dropping a sound right on a gameObject is probably the quicker way.
But by doing that you can see I've added the audio source component.
Right now there is no audio clip set so I need to select my audio clip.
So I can click the little selection target thing here and
this will show all of the possible audio clips that we've got.
I'm gonna go ahead and select the drone hum sound effect and
set that as the audio clip for this audio source.
And go ahead, let's go ahead and hit play.
[SOUND] So you can somewhat tell as the Earth gets closer,
the sound gets louder, and as it gets farther away, it gets quieter,
since the Earth is actually moving closer and farther from our camera.
The other thing I forgot to do is turn on looping, so
you can see that the sound stopped.