- Home /
What happen if you get an error while playing
I know this is a quick and dumb question, but i would like to know what happens if you build your game, open it, and then you get an error. For an example, i get "null reference something", how will it appear? Is the game going to crash? I am curious xD
Answer by Bunny83 · Dec 06, 2016 at 02:54 AM
No, If an exception is thrown inside any Unity callback (Update, OnCollisionEnter, Start, Awake, ....) the callback will be terminated immediately and Unity will show the exception in the log file.
So your application will simply continue running. However everything after the point where the exception is thrown will not be executed. It also will grow the log file quite fast if an exception happens every frame.
In general before you build / publish your game you should ensure your game is working properly. For example Apple won't approve apps that throw unhandled exceptions.