When importing a CSV into a data table using AssetToolsModule with a file containing an FText, the resulting FText value is invalid. As a note, there are no issues when importing an FGuid, a FString or a FVector.
Here is an example of the CSV to import as a DataTable:
,NameCheckpoint1,"NSLOCTEXT(""[2D45083E4A0E4844F79D62AE42EA7A0C]"",""DF8074A54B023F413FD1B4A9C658C347"",""First place"")"
Code to run to import the data:
FAssetToolsModule& AssetToolsModule = FModuleManager::GetModuleChecked<FAssetToolsModule>("AssetTools"); UCSVImportFactory* Factory = NewObject<UCSVImportFactory>(this); Factory->AutomatedImportSettings.ImportRowStruct = FCheckpointDataTable::StaticStruct(); Factory->AutomatedImportSettings.ImportType = ECSVImportType::ECSV_DataTable; UAutomatedAssetImportData* ImportData = NewObject<UAutomatedAssetImportData>(this); ImportData->bReplaceExisting = true; ImportData->Filenames = UsableFiles; ImportData->DestinationPath = DataPath; ImportData->Factory = Factory; ImportedAssets = AssetToolsModule.Get().ImportAssetsAutomated(ImportData);
The FCheckpointDataTable:
USTRUCT(BlueprintType) struct FCheckpointDataTable : public FTableRowBase { GENERATED_BODY() public: FCheckpointDataTable() = default; UPROPERTY(EditAnywhere, BlueprintReadWrite) FText Name; };
After running via ImportAssetsAutomated, observe an incorrect result (may vary):
(Name=NSLOCTEXT("[F9775C984D14798165E61DB816DBB97C]", "4AC41E3945B7FB01A1BAA280AC91453B", "First place"))
Versus when reimported manually in the editor, the expected result:
(Name=NSLOCTEXT("[2D45083E4A0E4844F79D62AE42EA7A0C]", "DF8074A54B023F413FD1B4A9C658C347", "First place"))
i have this problem UE4CC-Windows-58DC12AF4B97F057BD108FBFF569B2E9_0000
I am not able to find world outliner how to enable it?
Delay nodes occasionally don't fire the "Completed" output in a nativized build
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
How can i modify the param name in EQS node
How to achieve HLSL Multiple Render Target in Material blueprints?
When I open UE4 4.24.3 it appears that. Does anyone know how to solve?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-186362 in the post.
0 |
Component | UE - Editor - Content Pipeline |
---|---|
Affects Versions | 5.1 |
Created | May 18, 2023 |
---|---|
Resolved | Jun 28, 2023 |
Updated | Jun 28, 2023 |