- Home /
How do you get console messages in order?
Until now I thought, that the console lists errors and Debug logs ordered by time. But sometimes there are errors in update() in the beginning of the console and in the end there are OnCollisionEnter()-errors (both should be called after all start()s right?), while in the middle there are Start() and even Awake() errors. Collapse doesn't do what I want. How can I view the order, in which errors are thrown?
The messages will be in chronological order so long as the collapse option is turned off. You should I$$anonymous$$O very rarely turn it on - only if what you are interested in is the relative frequency of different lines of logging (generally speaking it's chronological logging that's going to be of most/any help).
So I suspect this is just about your understanding of what happens when.
OnCollisionEnter will be called when a collision occurs, so that can be at any time.
Awake is called when a component is first made active, Start is called before it gets its first Update.
So no, there are no rules like "OnCollisionEnter should be called after all Starts", or "all Awakes and Starts happen early on".
I think you might need to be more specific in your question - you could for example find some console lines that you were expecting to be ordered differently and show us those and the code generating them (and why you were expecting them to occur in a different order)
Your answer
Follow this Question
Related Questions
What's the difference between print() and Debug.Log() 1 Answer
How to disable errors in the console? 1 Answer
Health value isn't subtracting correctly 1 Answer
Input Button is not setup Error 1 Answer
Debug.Print not working 3 Answers