Now 30 years later, why do still have a check() function that completelly crash UE ?
Joke aside, isn’t there like a better pattern to come with ?
I developped my own Optional pattern in unity that I’ve been using for 10 years and nothing crashes or raises null ever in a regular flow.
Sorry to say but this kind of code is trash.
void UAsyncAction_ExperienceReady::Step2_ListenToExperienceLoading(AGameStateBase* GameState)
{
check(GameState);
ULyraExperienceManagerComponent* ExperienceComponent = GameState->FindComponentByClass<ULyraExperienceManagerComponent>();
check(ExperienceComponent);
}
Like am I the only one thinking this way ? Shoul I Ask claude to simply scan the code base and replace all those checks with grown up if/else ?
This comes in harshly but I’ve been clicking “Send and Restart” more that a healthy number of time today