Hi,
Is there any way to find out what’s causing NullReferenceException from log on build.
I mean can I somehow decode this error, without editing the source code, by adding lot of Debug.Logs or if(something == null) etc.
Example from log :
NullReferenceException: Object reference not set to an instance of an object
at “somescript”.Start () [0x000ca] in <3be48ce5f03b4533aa77cd728cbd94f0>:0
can I find what line of code is it? [0x000ca] etc.to find problematic variable?
Sorry if it was asked before, but I couldn’t find the answer
Unity’s IL2CPP strips all kinds of useful debugging info out, but sometimes you can still get the gist of where things are going wrong in the build by studying the stacktrace, even if it doesn’t tell you the line number of the crash.
Beyond that it’s really gonna be up to adding enough Debug.Log() calls to isolate where things are going south.
Is the build for windows? You can just attach the Visual Studio debugger to your game exe, for other plattforms it’s also possible but more complicated.