Book Image

Mastering Unity Scripting

By : Alan Thorn
Book Image

Mastering Unity Scripting

By: Alan Thorn

Overview of this book

Table of Contents (17 chapters)
Mastering Unity Scripting
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Debugging with MonoDevelop – the Immediate window


For games, the Immediate window acts like the Console window, as found in many first-person shooter games such as Unreal, Half Life, or Call of Duty. The Immediate window is docked by default in the bottom-right corner of the MonoDevelop interface. It becomes active in the break mode. Using it, we can enter expressions and statements that are evaluated immediately as though they were part of the source code for this step. We can get and set the values for active variables as well as perform additional operations. We can write any valid expression, such as 2+2 and 10*5. The result of these expressions is output in the next line in the Immediate window, as shown here:

Evaluating expressions inside the Immediate window

Of course, you're not simply restricted to writing isolated statements that involve basic arithmetical operations, such as addition and subtraction. You can write full expressions that include active variables:

Writing more advanced...