Hey I’m working in unreal and I’m trying to import a .csv asset as a data table at run time. This is my function below and it works for assets that are already imported into unreal but not for new assets.
Imported Data Path = DataTable’/Game/Blueprints/Data/ImportedData.ImportedData’
It doesn’t work when I point it at the new file in the same folder it returns nothing
New Data Pathpath = DataTable’/Game/Blueprints/Data/NewData.csv’(or NewData.NewData)
I feel like I am missing a step, like defining the new files structure or the cast is failing because it isn’t a “UDataTable” yet. Any suggestions?
UDataTable * UUlyssesBPFunctions::LoadTableByPath(FName Path, bool& result)
{
result = false;
if (Path == NAME_None) return NULL;
UDataTable* LoadedTable = Cast<UDataTable>(StaticLoadObject(UDataTable::StaticClass(), NULL, *Path.ToString()));
return LoadedTable;
}