|
Is there something in Unity for stopping the code while it is executing in some pre-determined points and then verify the value of whatever variables at that time and then keep on moving? Something like what VBA for Excel has. I ask this because I want to do something in the Update() function, but it doesnt do what I want, but when I try to see what is going on, the Update function doesnt stop, all I can get is whatever I put in the log. Is not any way of stopping it (other than the stop or pause button) and check what the current values are?
(comments are locked)
|
|
As well as using Debug.Break() to pause the editor, you can also switch the Inspector pane to "Debug Mode" which shows up all the variable values for the selected object, including private vars, so you can examine their values. To switch the Inspector pane to Debug mode, look for the small dropdown menu icon to the left of the "Inspector" tab, at the very top of the pane. The Inspector has a Debug mode, and shows private variables? Excellent! Here, have a +1. (And because you need more points - I hear at 10K, you get a free toaster-oven. :)
Mar 10 '10 at 02:41 PM
Cyclops
A toaster-oven? I thought it was a luxury cruise! All that effort, wasted!
Mar 10 '10 at 03:23 PM
duck ♦♦
(comments are locked)
|
|
Use Debug.Break(), which pauses the editor. Or, if you have "Error pause" selected in the console, you can use Debug.LogError(), which will also pause the editor.
(comments are locked)
|
