LS: Dr. Unreal or: How I Learned to Love the Crash


One of the most annoying parts of transition from Unity development to Unreal development is crashing. In Unity, if a project crashed, someone did something wrong, very wrong. Usually Unity will just throw exceptions and break out of the current function. Unreal on the other hand, seems to not believe in exceptions, and if one is thrown, will straight up crash to desktop. Unreal will even go as far as to not allow try catch statements in C++ code and will not let the code compile. I can see both the pros and cons of the Unreal approach to error handling compared to Unity’s handling.

On the pro side,this ensures that you know when something goes wrong in your game, you know something went wrong. This helps make sure that when your game is packaged into an executable, that it should not ever crash. I know other developers who when they see the red error text in Unity, they just not pay attention to it and just accept it happens. If it doesn’t break the game, then it never gets fixed. When Unreal forces you to crash to desktop, it makes sure that ¬†you know that the error is not good. This might be a good thing to experience in school now since in the game development world there are no exceptions, so making sure to not create any now is a good thing.

However, the downsides to crashing whenever an error is thrown is the frustration factor. When the process of getting back to the point you were at includes having to reopen UE4, hope you saved before you pressed play, and then you can start making changes again. When this happens multiples times in a night, it becomes demoralizing. Spending a few minutes getting back to the spot you just were at and then it crashes within seconds. Thankfully, Unreal provides a stack dump of when it crashed to help you know exactly where things went wrong. However, sometimes it provides no help, as in the feature image of this article. When this happens, you just have to start commenting out recently written code. Which can be a fun process in itself.

Leave a Reply

Your email address will not be published. Required fields are marked *