Recall & Review
beginner
What is the purpose of the Audio Source component in Unity?
The Audio Source component plays back audio clips in a Unity scene. It controls how sounds are heard, including volume, pitch, and spatial position.
Click to reveal answer
beginner
How do you assign an audio clip to an Audio Source component in Unity?
You assign an audio clip by dragging the audio file into the Audio Clip field of the Audio Source component in the Inspector window.
Click to reveal answer
beginner
What does the 'Play On Awake' option do in an Audio Source component?
When 'Play On Awake' is checked, the audio clip will start playing automatically as soon as the scene starts or the object is enabled.
Click to reveal answer
intermediate
Explain the difference between 'Loop' and 'Play One Shot' in the context of Audio Source.
'Loop' makes the audio clip repeat continuously until stopped. 'Play One Shot' plays the clip once without interrupting any other sounds playing on the same Audio Source.
Click to reveal answer
intermediate
How can you control the volume and pitch of an Audio Source component via script?
You can control volume and pitch by accessing the AudioSource component in a script and setting its volume and pitch properties, for example: audioSource.volume = 0.5f; audioSource.pitch = 1.2f;
Click to reveal answer
What happens if 'Play On Awake' is disabled on an Audio Source?
✗ Incorrect
'Play On Awake' controls whether the audio starts automatically. If disabled, you must start it manually.
Which property of Audio Source controls how loud the sound is?
✗ Incorrect
The volume property controls the loudness of the audio played by the Audio Source.
What does setting 'Loop' to true do in an Audio Source?
✗ Incorrect
'Loop' makes the audio clip repeat over and over until stopped.
How do you play a sound once without interrupting other sounds on the same Audio Source?
✗ Incorrect
PlayOneShot() plays a clip once without stopping other sounds playing on the Audio Source.
Which Audio Source property controls how 3D the sound feels (from 2D to 3D)?
✗ Incorrect
The spatialBlend property controls the mix between 2D (no spatial effects) and 3D (position-based) sound.
Describe how you would set up an Audio Source component to play a background music loop automatically when the scene starts.
Think about what settings make the sound start and repeat on its own.
You got /3 concepts.
Explain how you can change the pitch and volume of a sound during gameplay using a script.
Remember you can control these properties by code to make sounds higher/lower or louder/quieter.
You got /4 concepts.