I have multiple text files with different names, which I'd like to read into a struct I defined in a header file (working in Unreal Engine 4). These text files all contain multiple lines, all containing a name as well as 3 file locations which I'd like to have free access to. This is my struct:
struct FName
{
GENERATED_BODY()
UPROPERTY() FString name;
UPROPERTY() FString data_path;
UPROPERTY() FString model_path;
UPROPERTY() FString coll_path;
}
These files look like this:
EXAMPLE NAME1, \USERCONTENT\DATA1, \USERCONTENT\MODEL1, \USERCONTENT\COL1
EXAMPLE NAME2, \USERCONTENT\DATA2, \USERCONTENT\MODEL2, \USERCONTENT\COL2
etc
I know that I have to:
-get a list of all files in the directory
-iterate through all of them, and save this data to a my struct.
Number 1 is pretty easy, filesystem and dirent can do both, but 2) is a massive headache for me (I've searched online but to no avail, I need it as a struct, not a string). Any ideas?