Maybe someone will find it useful, here’s a macro for convenient logging of nullptrs using UE_LOG.
#define NULLPTR_LOG(ptr) UE_LOG(LogTemp, Error, TEXT("%s%s"), TEXT(#ptr), TEXT(" was nullptr"))
This way you just need to write something like NULLPTR_LOG(PressurePlate)
to get a message
if (PressurePlate)
{
PressurePlate->GetOverlappingActors(OverlappingActors);
}
else
{
NULLPTR_LOG(PressurePlate)
}