Wondering About a Better Assert
23 Oct 2026
Unreal has a menagerie of asserts but the main ones are “check” and “ensure”. “check” stops the execution and crashes the editor (like C’s “assert”). “ensure” is a softer touch, logging an error and breaking if there is a debugger attached. Because we don’t want designers to lose time and work on editor crashes, we use “ensure”.
But this feels suboptimal to me. A designer makes a change and triggers an ensure, but if their feature works they’ll submit the change list none-the-wiser. You only check the error log when something is visibly wrong. So now a programmer is going to hit that ensure, they have to track down what caused it, and if the needed correction isn’t obvious they need to find the designer who is responsible and so on…
I think there ought to be something like “ensureWithNotification”, something that behaves like “ensure” but also alerts editor users more visibly of issues. Another option is to perhaps rehabilitate “check”, make a version of check that crashes PIE but not the editor as a whole.
I thought about these things while at Sumo but never got around to implementing them, and when I was working on Heldritch Rush I didn’t feel there was a need because I think these features are more useful at AAA scales.