Skip to main content
‹ Back to Tutorials
Intermediate Unity

Making a Mobile Bounce Game with Unity 3D and Playmaker - Making a Level Complete System

Jan 31, 2021
About this tutorial

Beginner Game Design tutorial series creating a simple Bounce type game using Playmaker within Unity 3D. PART 15 - In this video, I'll finish off this series with setting up a Level Complete system that we can continually update. Absolutely NOCODE. Also make a skateboard game playlist: https://bit

Written Guide

This final entry in the bounce-game series turns a single endless level into a real game loop: a win condition, a level-complete screen, escalating difficulty, and a continue button that resets everything cleanly. The whole system is built in Playmaker with three global variables and one new FSM.

Step 1 — Add the level-tracking globals

Alongside the existing score global, create three new global int variables: level number (start it at 1 — nobody plays level zero), current level count (start at 5 — the paddle hits required to finish the level), and current level score (start at 0 — hits so far this level). The plan: level one needs 5 hits, level two needs 6, and so on, each level adding one. In the existing paddle-hit FSM, copy the Int Add action that feeds the global score and point the copy at current level score, so every paddle hit increments both.

Step 2 — Build the level-complete UI

Create a new canvas named UI - Level Complete with a panel scaled to about 0.8 so it doesn't fill the whole screen, in a bright color. Add three TextMesh Pro texts: LEVEL (around 60 pt, bold), a placeholder level number (bumped to 90 pt so it dominates), and COMPLETE. Add a Continue button — 350 x 90, orange-yellow, bold off-white label — and place it low on the panel. That's a deliberate mobile choice: players hold the phone from the bottom, so buttons near the bottom edge are reachable without shifting your grip.

Step 3 — Detect the win

Add a new FSM on the Score Manager and name it Level Complete. Its first state runs an Int Compare (every frame) between current level score and current level count. Fire a level complete event on both Equal and Greater Than — the greater-than case matters because fast wall bounces can register two hits in quick succession and skip right past the exact number. The level complete state then activates the UI and the confetti (turn looping off on the particle system so it plays once), and deactivates both the controller and the ball so play stops.

Step 4 — Update the numbers

A follow-up state uses Int Add to bump level number by 1 and current level count by 1, then Set Int Value to reset current level score to 0. That last reset is easy to miss — without it the compare is already at the target when the next level starts and instantly re-triggers the win. The on-screen level number comes from the existing Update UI FSM: duplicate its convert-to-string and Set Property actions, point them at the level number global, and target the level-num TextMesh Pro text.

Step 5 — Wait, listen, reset

After updating numbers, Wait about 5 seconds so the confetti finishes (4 feels snappier), then sit in a state with a UI Button On Click Event watching the Continue button. The reset state mirrors the win state in reverse: UI off, confetti off, controller and ball back on, ball repositioned to (0, 5.3, 0) with Set Property. One last bug from the video: the ball keeps its old velocity through deactivation and rockets off on reset, so add a Set Velocity action zeroing it out. Then loop back to the compare state and the next level begins.

Unity tools by Bliz Studio
Built for our own games — now on the Asset Store

Multi Tag — unlimited hierarchical tags for any GameObject. Hierarchy Pro — style your whole hierarchy with rules. Made by a Unity dev, for Unity devs.

Explore our Unity assets →