Hello, the loading code should be correct. I think it might be the path.
Can you try these ones :
- /Game/Blueprints/Data/NewData
- /Game/Blueprints/Data/NewData.NewData
- DataTable’/Game/Blueprints/Data/NewData’
?
Hello, the loading code should be correct. I think it might be the path.
Can you try these ones :
?
Haaaaa ! I thought you import your csv as a DataTable in the editor before trying to load it. You won’t be able to load it like this indeed, whatever the path is. I think the LoadObject functions load only .uasset.
So 2 solutions :
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;
}