What is the best way to deal with missing required components (or any other “fatal” errors for that matter)?
Since the Grabber
requires a PhysicsHandleComponent
, what is the best way to deal with it? It feels that having to check for a nullptr everytime feels error prone (too easy to forget to check), moreover, there is no point running the game/simulation in that case.
One could use a Fatal
ulog message in BeginPlay, but crashing the editor is not convenient either, and even dangerous is there is unsaved work.
I found some macros (check
, verify
, …) but they also causes crashes of the whole editor instead of just stopping the game/simulation.
Is there anything better?