Hey Guys,
I’m trying to dynamically load a .csv file via code. However I get this error:
error C2664: ‘ConstructorHelpers::FObjectFinder::FObjectFinder(const ConstructorHelpers::FObjectFinder &)’ : cannot convert argument 1 from ‘FString’ to ‘const TCHAR *’
// Code above this is irrelevant
FString testSong = TEXT("DataTable'/Game/SongData/Arroz/arroz_track_01.SongNoteData'");
generateNotes(testSong);
}
std::vector<ANoteSphere> ASongMode::generateNotes(FString song)
{
UDataTable* songData;
ConstructorHelpers::FObjectFinder<UDataTable> SongLookupData_BP(song);
songData = SongLookupData_BP.Object;
std::vector<ANoteSphere> noteSpheres;
return noteSpheres;
}
That’s the code I’m using that has to do with the error. Am I missing a .h file for DataTables? Or is there something else causing this error? I am a total UE4 noob so I’m still trying to wrap my head around some concepts…