hi.
i’m trying to create one struct in C++ and get it exposed to the editor… but i’m not able achieve this…
this is what i have
USTRUCT(BlueprintType)
struct FItem
{
GENERATED_BODY()
UPROPERTY(BlueprintReadWrite)
FString ItemName;
UPROPERTY(BlueprintReadWrite)
bool IsImportant;
UPROPERTY(BlueprintReadWrite)
int32 ItemID;
};
is compiling well but i’'m not able to see it in the editor and i’m not able to use it with DataTable
any help?
I think you habe to inherit from FTableRowBase like this
USTRUCT(BlueprintType)
struct FItem : public FTableRowBase
{
…
};
edit: ah no sry i think you just have to do this if you want to use it with datatabels
But in my structs i use
GENERATED_USTRUCT_BODY()
instead of
GENERATED_BODY()
maybe this does the trick
and also add a default constructor like
FItem(){}
actually is what i’m trying to do… i want to use it with Datatables… i did a quick try but nothing of this works…
Not sure what the issue is then. It should work like this.
Maybe check out Data Driven Gameplay Elements | Unreal Engine Documentation
if you can find any other issue.
Maybe also try to recompile from Visual Studio and not using the compile button inside the engine.
after i deleted the .vs folder i was able to import my datatable with that row structure. thank you for your help!