Hi, as the title says, I’m experiencing an issue with a plugin I’m developing.
When I remove an item from an array or empty it, I get one or several occurrences of this type:
I see you linked an old post of mine, there are other ways to read/write to ini files.
Maybe this is of help, since you are developing your own plugin you might have enough freedom to use the method in my reply here:
I’m compiling for the latest three engine versions (5.1, 5.2 and 5.3), it will be a free plugin on the marketplace.
I tried to call “Flush” but as you can see the issue still persists:
I made this plugin 'cause I wanted to sync these bookmarks in source control, so that other users can see the relevant project maps (what CommonMaps does in Lyra, but it’s a plugin instead of being embedded in the source code)
What exactly this is for I can’t tell without deep diving into it, but it seems there are only 2 files referencing “ClearArray” in UE5.2 . nothing on google.
ConfigCacheIni states on line 2050:
“// look for pointless !Clear entries that the config system wrote out when it noticed the user didn’t have any entries”
Thanks for the tool, I’ve installed it and I’ll probably use it in future, I was using Rider to look for that string and I’ve found the same files you’ve found:
I’ve searched for that __ClearArray__ anywhere and I found nothing, also AI chatbots like Copilot/Codeium/ChatGPT/Claude/Gemini have no idea about that
Thanks for the code, I scanned over it quickly.
It adds an editor dropdown that you can use to bookmark levels or even any uasset to a list?
I have no idea, I don’t use Lyra
I agree that having what seems to be garbage like “ClearArray” in your ini does not look clean / professional, but are there any problems left to solve? Sometimes the engine just makes a mess and it’s easier to accept it than to try to hack around it which can lead to actual problems. If you wish to process the bookmarks under the ini section you could filter out that bad line “if string contains !LevelBookmarks then skip”. Is that right?
It’s supposed to work with levels, but actually it works with any asset if you add it manually to the list (levels have a right click option to add them in a faster way)
In theory, no… I’ve already sent the publish request to the Epic Marketplace but I’d like to fix that minor issue since it’s something I’m sharing with the community and not using it for myself only!
I’ve learnt this on my skin! I am a perfectionist with a severe OCD
The __ClearArray__ thing is not shown in the list, it’s probably something nobody would have even noticed, it’s just the .ini file that is dirty and if you do it several times you’ll find it full of __ClearArray__ lines
I’ll probably put something in the plugin shutdown function that deletes all the lines in the .ini file if I don’t find anything better.
If there’s no problem, optionally put it in a “known issues” section and make clear it is no problem, but a leftover of EPICs mess. I know perfectionism. The code written in this engine is no perfectionism you can’t get around it.