- Home /
C# script failing silently?
Recently I've noticed that sometime my C# scripts are failing (they have some sort of exception), but Unity isn't reporting any errors.
One example I had was try to access an empty Dictionary. The script failed (as it should), but there were no messages in the log. Using manual Debug.log strings I tracked the problem to the line before the access to the empty Dictionary. On the same line, if I attempt to access the Dictionary inline (I.E. try to Debug.log the results of a Dictionary access, the message fails to display - again, with no error).
As anyone else noticed this behavior and/or have any idea of the cause?
Where do you access the Dictionary? In the main thread? I never experienced such behaviour yet. Can you add some more context to your question? $$anonymous$$aybe a code snippet? Can you reproduce this behaviour with a simple script?
Ah, my apologizes. I had a rogue try-catch that didn't have any error reporting.