I am aware of: Unity - Manual: Log files but I do not know how to read these? The editor log does not print the crash line,but only the last line you put a print on… So you need prints in every line to track it down it seems. There has to be a better way to find what line number that I’m crashing Unity,right?
Reddit link: In cases where the user is at fault for crashing Unity,how do we tell what line number crashed Unity? : Unity3D
Is Unity crashing to the dashboard? Or just locking up?
If Unity is just locking up, it’s probably just an endless loop in your code.
Unity will lock up 100% of the time EVERY millisecond your scripting code is running.
Nothing will render, no input will be processed, no Debug.Log() will come out, no GameObjects or transforms will appear to update.
Absolutely NOTHING will happen… until your code either:
As long as your code is looping, Unity isn’t going to do even a single frame of change. Nothing.
No exceptions.
“Yield early, yield often, yield like your game depends on it… it does!” - Kurt Dekker
Is Unity crashing to the dashboard?
yes,100% of the time,but can’t find the line.
Makes it tricky because as a coder of 42 years, I know how to debug, but not technological aspects of Unity by which to get the information I need.
I really don’t want to place:
If(constantSingleton.ElaborateDebug) Debug.Log("You’re in File X, Line Number Y);
on every other line of my code.
There should be an editor or crash dump that tells you what line of code Unity crashed on, right? but I never found this easily.
Path to the crash dump should be printed in the last line of the log when the editor crashes. It’s unusual for game code to crash the whole editor though, unless you’re dabbling with native (C++) code or run out of memory. You could also run Unity.exe under a debugger.
Does the crash dump say the line number(s) of crash?
Depends on what causes the crash. I’d suggest opening it and seeing what it shows.
Hello,
I’ve had an issue for days no one can solve:
How do you find the line numbers of the offending error I caused if Unity Crashes? Normally you see it in console.
I can’t find crash logs to open. They do not appear not where the UNITY official documentation alludes.
You found the crash logs at 0:35 in your video. Each crash gets its own folder with a date and time. Open those folders up and things should be inside.
Those were not the crash logs of the crash that occurred. They’re standalone crash logs not editor crash logs.