- Home /
Unity Alert or Trace
Is there a way to trace out some text, or fire a pop up alert in unity to make sure you are getting into a specified function or get the value of specific variables?
Answer by Michael La Voie · Apr 14, 2010 at 08:27 PM
Yes, Debug.Log() will output text or the contents of an object to the console tab.
Answer by Cyclops · Apr 15, 2010 at 01:44 PM
Michael's answer is correct, but for showing variable values, there is another option that I recently found. You can put the Inspector into Debug mode (via the drop-down triangle on the right side), which lets you see all variables in a script, not just the public ones.
They do have to be permanent variables, declared outside of a function (if you declared a temporary var in Start(), for instance, it would be gone). But they don't have to be declared public, to be visible in Debug mode.
Your answer
Follow this Question
Related Questions
Trace which line of a script called a particular function 2 Answers
DEBUG;TRACE; Compile Problems 1 Answer
Unity crashes without debugging 0 Answers
Debugging an Android device from Visual Studio 2019 2 Answers
Input Button is not setup Error 1 Answer