Skip to Main Content
Learning 2D Game Development with Unity®: A Hands-On Guide to Game Creation
book

Learning 2D Game Development with Unity®: A Hands-On Guide to Game Creation

by Matthew Johnson, James A. Henley
December 2014
Beginner content levelBeginner
384 pages
11h 15m
English
Addison-Wesley Professional
Content preview from Learning 2D Game Development with Unity®: A Hands-On Guide to Game Creation

Using Breakpoints to Halt Code Execution

There are times when you’re going to want to closely examine the code during runtime and Debug() won’t cut it. In these situations, we can attach MonoDevelop directly to the Unity process and step through code execution by using breakpoints.

Breakpoints cause the code to halt when they’re encountered. You can then use MonoDevelop to step through the code, one line at a time, to see where it goes and what it does. You can also monitor the values of variables while doing this, making it an excellent way to catch and resolve unexpected behaviors in your game.

We’re going to introduce one such behavior into our game and then use the debugger to catch it. Start by altering the PlayerController script to match ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Game Development with MonoGame: Build a 2D Game Using Your Own Reusable and Performant Game Engine

Game Development with MonoGame: Build a 2D Game Using Your Own Reusable and Performant Game Engine

Louis Salin, Rami Morrar
Game Development Projects with Unreal Engine

Game Development Projects with Unreal Engine

Hammad Fozi, Gonçalo Marques, David Pereira, Devin Sherry

Publisher Resources

ISBN: 9780133523416Purchase book