DataTables exported to JSON in editor (UDataTable::WriteTableAsJSON, accessible by right clicking a data table and picking export to json) that contain variables with spaces or other outlawed characters cannot be reloaded in engine(UDataTable::CreateTableFromJSONString) in a cooked game because the name information is missing in cooked builds . The attached image shows an example, "Type With Spaces" will not properly export and import, while TypeWithNoSpaces is fine.
The reporter identified a discrepancy (Editor vs Engine) when calling UUserDefinedStruct::GetAuthoredNameForField. The editor will return a friendly name (ie with spaces) while the a cooked build will return the actual FName. For most variable names this will be the same.
The core of this problem is that FMemberVariableNameHelper::Generate is using a very restrictive list of invalid characters via INVALID_OBJECTNAME_CHARACTERS, and will mangle any name that uses them in a way that can't easily be recovered from. This is more restrictive than blueprint variables which use UE_BLUEPRINT_INVALID_NAME_CHARACTERS that only outlaws "."
There's no easy repro right now for this because none of our games allow importing data in a cooked build. Here is a programmer repro:
How does TextureRenderTarget2D get TArray<uint8> type data?
Why does the REMOVE method of map container remove elements have memory leaks?
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
How to delete some elements correctly when deleting an array loop?
How do I set a material as a post-processing material?
What is the difference between Camera and CineCamera?
UMG RichText not appear image when packaged
How would I go about lerping the rotation instead of it snapping when turning (pls dont sue me epic)
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-96724 in the post.
3 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.25 |
Created | Aug 11, 2020 |
---|---|
Updated | Nov 27, 2023 |