Hello, I have an ArgumentException
ArgumentException: The Object you want to instantiate is null.
which is presumably thrown by an Instantiate() call.
Clicking on the error in console the GameObject containing the script that throws the error is highlighted in hierarchy, but i cannot find a way to see which script / line is causing the error.
Is there a way to “trace” it?
I am using Unity 2020.2.4f1
thanks
It’s kind of annoying: some things you can doubleclick on and it takes you there, some (like this and others) you cannot.
instead, single-click on it, then look in the lower portion of the console to see the callstack how you got theere.
1 Like
Well, if you know which gameObject is causing the error, it might be simplest just to look through each of the Instantiate() calls in that object’s scripts. Otherwise, using Debug.Log messages before each instantiation call, or using try-catch blocks to throw custom errors, might help you pinpoint exactly where things go awry.
Fixed: right click on the console tab, go to Stack Trace Logging > Error > ScriptOnly
thanks guys!
2 Likes