Unreal doesn’t do anything special in regards to structure initialization. It’s all just standard C++, so what you’re getting is the random stack data in the memory where your structure was allocated.
In addition to @NilsonLima’s suggestion to create constructors, you can also use inline initializers like this:
struct FCharacterAttributes : public FTableRowBase {
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, SaveGame)
USkeletalMesh* Hair = nullptr;
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
int32 Speed = 0;
}
Another wrinkle is that Unreal does require that USTRUCTs have a default constructor. So if you add a constructor with any non-defaulted parameters, you’ll also have to make sure to have one that is callable without any parameters.
But you can simplify that a little with a defaulted constructor like so:
FCharacterAttributes( ) = default;
if you’ve used the inline initializers.
You can also use inline initializers for properties of UCLASS’s, but in that case Unreal does initialize everything to zero so you can omit those defaults if you want (I don’t recommend it, but you can).