Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SPontadit opened this issue Oct 17, 2024 · 0 comments
Open

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

SPontadit opened this issue Oct 17, 2024 · 0 comments

Comments

@SPontadit
Copy link

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!

@SPontadit SPontadit changed the title ImGui.ini is deleted at during Shutdown in packaged bulid ImGui.ini is deleted during AppExit in packaged bulid Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant