Unity Foundations·From empty scene to playable build

UI, audio and player feedback

Feedback tells the player what happened and why it mattered.

Beginner 13 min read Lesson 9 of 300 Challenge included
What you will be able to do
  • Use a Canvas Scaler for different screen sizes.
  • Pool or reuse UI elements instead of instantiating every frame.
  • Separate audio data from the gameplay rule that triggers it.

In plain English

Use Canvas for screen-space UI, keep labels readable at different resolutions and update text from a small presenter script. Audio should confirm actions without masking important sounds. Add a mute control and respect reduced audio preferences.

ScorePresenter.csC#
using TMPro;
using UnityEngine;

public class ScorePresenter : MonoBehaviour
{
    [SerializeField] private TMP_Text label;
    [SerializeField] private AudioSource pickupSound;

    public void ShowScore(int score)
    {
        label.text = "Score: " + score;
        pickupSound.Play();
    }
}
Your turn

Present a score change

Medium

Write a method that updates a TMP label and plays a pickup sound when the score changes.

CSHARP · starter
public void ShowScore(int score) {}
Check your understanding before moving on.
Knowledge checkQuestion 1

Why use a Canvas Scaler?

Select an answer to continue
Study tools

Make it yours.

Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.

Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign in
Finished reading?

Lock in what you just learned.

Mark this lesson complete to save your place and move one step closer to the certificate.

Next: Builds and performance
Lesson 9 of 300 · 0% of course