Struct change and Data table

4-26 user here. In my experience Datatables properly update properties defined in their c++ structs after restarting the editor. I never use the hot-reload feature as I’ve been told it is experimental / causes corruption. So just close the editor, wait a few seconds, recompile in VS and restart the editor.

There’s no reason why you’d want to define a USTRUCT in a UAsset file as it will just complicate things later on if you want to port code from BP to C++.

The only trouble I’ve experienced with datatables is that they do not automatically respond to renaming a c++ struct, but that can be solved with a redirector.

USTRUCT(BlueprintType)
struct FS_Appointment : public FTableRowBase  {
	GENERATED_BODY()

	UPROPERTY(BlueprintReadWrite, EditAnywhere)
		FDateTime DateTime;

	UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (Tooltip = "Duration in hours"))
		float Duration;

	// Initialize
	FS_Appointment() {
		DateTime = FDateTime(FDateTime::UtcNow().GetYear(), 1, 1, 12);
		Duration = 1.0f;
	}
	FS_Appointment(FDateTime InDateTime, float InDuration, FGuid InEcoZoneID, E_EcoAppointmentRecurrance InAppointmentRecurrance, int InPriority) {
		DateTime = InDateTime;
		Duration = InDuration;
	}

	// Operators
	bool operator==(const FS_Appointment& Other) const {
		return (
			DateTime == Other.DateTime
			&& Duration == Other.Duration
		);
	}
};