# Array in ini file not preserving duplicates 

**URL:** <https://forums.unrealengine.com/t/array-in-ini-file-not-preserving-duplicates/2679663>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [October 27, 2025, 8:08pm UTC](https://forums.unrealengine.com/t/array-in-ini-file-not-preserving-duplicates/2679663 "2025-10-27T20:08:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [October 27, 2025, 8:08pm UTC](https://forums.unrealengine.com/t/array-in-ini-file-not-preserving-duplicates/2679663/1 "2025-10-27T20:08:23Z")

</div>

This question was created in reference to: [Array in .ini file not preserving [Content removed]

I’m seeing the same issue and can’t figure out a way around it. Reproduction steps attached.

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [October 27, 2025, 8:08pm UTC](https://forums.unrealengine.com/t/array-in-ini-file-not-preserving-duplicates/2679663/2 "2025-10-27T20:08:27Z")

</div>

**Steps to Reproduce**

1. Open UE5.6 project
2. Go to Engine/Console in Project Settings
3. Duplicate entry in Auto Complete Map Paths and add some duplicate blank entries
4. Reload the editor
5. Observe that the duplicates will be removed

---

<div class="post-metadata">

**Author:** ![VBarataBLab](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VBarataBLab](https://forums.unrealengine.com/u/VBarataBLab)\
**Post date:** [October 29, 2025, 6:06am UTC](https://forums.unrealengine.com/t/array-in-ini-file-not-preserving-duplicates/2679663/3 "2025-10-29T06:06:47Z")

</div>

Hi Ben,

Thank you for the report and repro steps. I was able to reproduce this behavior on my end here.

After investigating the source code, it appears that saving a TArray containing duplicate values in a config file that is part of the Default INI hierarchy is not supported. The reason lies in file [Obj.cpp], function UObject::SaveConfig(), line 3548 (considering vanilla UE 5.6 from the launcher), where “FString CompleteKey” is calculated:

`FString CompleteKey = FString::Printf(TEXT("%s%s"), bIsADefaultIniWrite ? TEXT("+") : TEXT(""), *Key);`The code above always forces the prefix “+” (never “.”) for this kind of config file. And I also checked that the problem still exists on the latest engine version from the repo. I guess that using prefix “.” was never needed for the built-in settings. “AutoCompleteMapPaths”, for example, does not need duplicate entries, but let me know if you can find a setting where they should be allowed, since this would help us flag this issue as a bug instead of a missing feature. In any case, I am investigating a little more before passing this on to the engine devs.

Now, I understand that you want to create some settings of your own, and include a TArray where duplicate values are desirable. One possible workaround for this is to use a fixed-size array instead of a TArray, if it is acceptable for your use case. Otherwise, I can think of a fairly simple engine modification to add the functionality you need. Basically, you could create a Property Meta to indicate that a TArray property should be saved to config files with “.” instead of “+”. On your settings class, you would have:

`UPROPERTY(EditAnywhere, Config, Meta = (ConfigAllowDuplicates))`Then, on UObject::SaveConfig(), when calculating “CompleteKey”, you would be able to query that metadata to choose the appropriate prefix:

`Property->HasMetaData(TEXT("ConfigAllowDuplicates")) ? TEXT(".") : TEXT("+")`Let me know if this helps!

Best regards,

Vitor

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [October 29, 2025, 7:36pm UTC](https://forums.unrealengine.com/t/array-in-ini-file-not-preserving-duplicates/2679663/4 "2025-10-29T19:36:40Z")

</div>

Thanks Vitor! Adding a meta tag worked great.

I hope this is a change that could be rolled back into the engine.
