Learn Unity and C# by Making Games / Clicker Game Project
Show changing game state in the UI so players understand what happened.
In this lesson, you’ll learn how to:
Let’s start by making our click count look bold and colorful once it passes a certain number.
Update your script:
1public void CountClick()2{3 clickCount++;4 5 if (clickCount >= 10)6 {7 clickText.color = Color.yellow;8 clickText.fontSize = 60;9 }10 11 clickText.text = "Clicks: " + clickCount;12}For better control, you can format text like this:
1clickText.text = string.Format("Total Clicks: {0}", clickCount);You can also use rich text tags with TextMeshPro (TMP) like , , .
Example:
1clickText.text = $"Clicks: {clickCount}";If you want to animate the text size on each click:
CountClick():1LeanTween.scale(clickText.gameObject, Vector3.one * 1.2f, 0.1f).setEasePunch();Boom 💥 – the text will "pop" every time it's updated.
Let’s make that click feel good. We’ll add sound effects and make the whole experience more satisfying.
Keep it small enough to finish in five minutes, then write down what changed and what Unity showed you.
What is the best next step after reading a lesson section?
download
Use this before starting a new Unity prototype.
reference
Official reference for Unity editor concepts, components, and workflows.
reference
The fastest way to verify classes, methods, and Unity-specific behavior.
download
Checklists and creator resources for keeping projects moving.