Empty UPROPERTY

At 6:30, there is a comment about UPROPERTY being required even if the list of specifiers is empty.

It should be noted that with UE5, Epic also recommends to use TObjectPtr rather than raw pointers:

UPROPERTY()
TObjectPtr<UUserWidget> HUD;

This allows UE to track when the object is used when debugging, and for safety, it also ensures that the pointer is always initialized

1 Like

Privacy & Terms