Unity Playmaker Quick Tip - Add Breakpoint in State Machine
In this Unity + Playmaker quick tip tutorial, I am going to show how to add a breakpoint to your State Machine. This is a great way to stop the state machine to investigate what might be going wrong or if you are testing and want to see what's happening as your state machine plays. My discord link
This quick Playmaker tip covers toggling breakpoints in your state machines - a debugging tool that freezes the game the instant a chosen state begins, so you can see exactly what is happening at a specific point in your logic instead of guessing from the outside.
Why breakpoints matter in Playmaker
Once you start building complex state machines, failures stop being obvious. A pattern that loops thirty times and then hands off to a second loop can misbehave somewhere in the middle, and watching it run at full speed tells you almost nothing. A breakpoint stops the world at the entrance to a state, letting you inspect the situation at that exact moment - the same technique code debuggers use, built right into Playmaker.
Adding a breakpoint
Right-click any state in the FSM and choose Toggle Breakpoint. A little red line appears at the top edge of the state to mark it. In the demo, breakpoints go on two states: the beginning of the second set of loops, and the beginning of the fireball state. The same right-click toggles a breakpoint off when you are done with it.
What happens at runtime
Hit Play and let the machine run. The first loop pattern plays through normally - the initial wait, then the looping pattern - and the moment execution enters the breakpointed state, the game stops right at its beginning. Nothing advances until you say so, which is precisely the point: you can now examine variables, the scene, and the state graph while time is frozen at the interesting moment.
Stepping forward
To move past the freeze, press the next frame button. Execution advances and immediately lands in the next state - and if a state only spans a single frame, one step carries you straight through it. Stepping frame by frame through a suspect stretch of your machine shows you the exact sequence of state entries, which is usually all you need to spot where the logic goes wrong.
When to reach for it
Any time something is happening inside your states and you cannot tell what, drop a breakpoint at the start of the suspicious region and step through. It turns invisible, full-speed state transitions into a slow-motion walkthrough - one of the fastest ways to analyze what is really going on at a specific point in your machine.





