Skip to content

ImGui.ini is deleted during AppExit in packaged bulid #26

@SPontadit

Description

@SPontadit

Hello !

I have noticed that in a packaged build, the ImGui.ini file is deleted when the app shutdown.

I quickly checked what was happening . When the app is running, the ImGui.ini file is created in the Config/Platform folder. But when the app stops, when GConfig->Exit() is called, the engine deletes the file.

I haven't had the time to really dig into, but it seems to be because the ImGui.ini is not an "Unreal Engine" formatted ini.
In FConfigFile::WriteInternal, there is a call to WriteToStringInternal which determine the text to write to the file. If text is empty the file is deleted. In the case of ImGui.ini WriteToStringInternal does not return anything.

My current hotfix for this problem is to slightly change the IniFileName to save it in FPaths::GeneratedConfigDir() instead of FPaths::GeneratedConfigDir() / FPlatformProperties::PlatformName() as the platform does not really mater for this ini file (at least to us).

I can make a pull request if you want! Or feel free to fix it yourself or find a more elegant way to fix the issue!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions