USTRUCT with FKeys won't compile

In the following USTRUCT, if I remove the Fkeys and just use some other variable types, it compiles.

But using the Fkeys, I get the following error:

...UHT\DataTables.gen.cpp(23): error C2509: 'StaticStruct': member function not declared in 'FUI_Inputs'
 ....\Data\DataTables.h(9): note: see declaration of 'FUI_Inputs'

Code:

#pragma once

#include "Engine/DataTable.h"
#include "CoreMinimal.h"
#include "InputCoreTypes.h"
#include "TestStructs.generated.h"

USTRUCT(BlueprintType)
struct FUI_Inputs : public FTableRowBase
{
	GENERATED_USTRUCT_BODY()
	
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UI Navigation")
	FKey GamepadAccept;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UI Navigation")
	FKey MKBAccept;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UI Navigation")
	FKey GamepadCancel;

Here is some example code that does compile:

#pragma once

#include "Engine/DataTable.h"
#include "CoreMinimal.h"
#include "TestStructs.generated.h"

USTRUCT(BlueprintType)
struct FPlayerStats : public FTableRowBase
{
	GENERATED_USTRUCT_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Player Stats")
	int32 Health;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Player Stats")
	int32 Armor;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Player Stats")
	int32 Attack;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Player Stats")
	int32 Defense;
};

What’s the difference?

I had changed name of the file, but didn’t update the #include with the new .generated.h name.

Probably some way to autoupdate on a name change? Would be good to know - this issue has got me a couple times now :slight_smile: