0

When I run my scene in the Unity Editor, everything works fine. However, when I build the exact same scene, no matter for which platform, I get loads of NullReferenceExceptions that didn't show up before. I checked the Unity Player logs after clearing them and only running in the Editor and saw that NullReferenceExceptions were thrown even though the editor console didn't show anything.

Why are these errors not shown while running in the Editor?

I never really liked how Unity likes to "ignore" errors and just keeps running, kinda like javascript.

Edit:

My question is not specifically about the error itself, but about why Unity conceals it in the Editor and not in the build.

Julius Naeumann
  • 422
  • 1
  • 10
  • 19
  • Possible duplicate of [What is a NullReferenceException and how do I fix it?](http://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-and-how-do-i-fix-it) – maraaaaaaaa Oct 13 '15 at 15:27
  • Not sure what you mean by "I checked the Unity Player logs(...)". Do the exceptions show up in the log file but not in the Editor console? Or do they really only show up in the build? – Benjamin Schug Oct 13 '15 at 17:32
  • @BenjaminSchug I opened the logs with console > Player Logs. The errors don't show up in the editor console, but they are in the logs, and somehow also in the exported project - where the errors are **not** ignored. I can attach screenshots if you want? – Julius Naeumann Oct 13 '15 at 17:40
  • Huh, this is weird. Are you sure that you cleared the log file before running it in the editor? IIRC the Player Log is not cleared as long as there is at least one Unity instance running. – Benjamin Schug Oct 13 '15 at 20:27

0 Answers0