About 'GetComponent To Play Audio'!

In this video (objectives)…

1. Understand Audio Listener, Audio Source and Audio Clip.

2. Use GetComponent to access the Audio Source and play our clip.

3. Ensure that the sound does not start until the ball is launched.

After watching (learning outcomes)…

Trigger sound effect each time the ball collides with something.

(UVR 18_BR_CUD)

We would love to know…

  • What you found good about this lecture?
  • What we could do better?

Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…

  • Be in the correct forum (for the course).
  • Be in the right sub-forum (for the section)
  • Have the correct lecture tag.

Enjoy your stay in our thriving community!

I got a bit stuck on this one, but I figured it out. I forgot the parenthesis after Play.

Its a great lecture. I have no idea why I can’y get my sound to work though? I followed all the code and settings but no joy… I attached a clip of the error message I got. I checked everything I can think of…

see tiny red error message in the bottom left HS

Looks like you haven’t attached an audio source to something. Go through the steps and make sure that you have an audio source component on the correct game object.

Privacy & Terms