Hi all…
I have a data table that is populated with data. The structures that define the schema are all structs that were created in UE itself, not C++.
However, I am spinning up a new project/plugin and I need to be able to access to that data in C++. To do this, I have created new UStructs in C++ that inherit from FTableRowBase that take on the same name as the ones built in UE.
There does not seem to be any collisions between the UE created structs and the C++ structs. No compile time or runtime errors. My thought was, maybe because when you create a struct in UE, the “F” naming convention prefix is not applied to them as it is in C++? Not sure… But anyway.
So, I have figured out how to load the data table up in C++, that’s no problem, I can even convert some of it to JSON and print it out.
However, I would like to have the data table give me all the rows in struct format, so I am calling this function:
TArray<FMyStruct*> myStruct;
FString sContext = "";
_myDataTable->GetAllRows( sContext, myStruct );
Two things…
First, what is the context variable? I have searched around, but not finding what it is in this specific instance.
And second, this compiles and there is no runtime error. However, myStruct is always empty after the call. At this point, I know the _myDataTable has data in it, but for some reason it’s just not getting populated.
Is it possible that this function does not do what I think it does and I should be using a different function? Does the Context variable need to be something specific? And if so, what?
Is it because the DataTable was defined using the blueprint version of the structs and it is ignoring my C++ version despite being identical in data types, names and all that?
Any help will be greatly appreciated.
Thanks