pkdawson / imgui-godot

Dear ImGui plugin for Godot 4
MIT License
336 stars 20 forks source link

Cannot ignore imgui.ini #74

Closed TheEnbyWitch closed 2 weeks ago

TheEnbyWitch commented 2 weeks ago

No matter what I try to do, I can't prevent ImGui from creating the imgui.ini file.

Even if I try to leave a blank field in Ini Filename in the config, or try to forcibly override it to be null in C#, the imgui.ini file still gets created and used.

pkdawson commented 2 weeks ago

Thanks for reporting. There was a bug with loading the configuration, and SetIniFilename was also broken in C#. Fixed in v6.1.0.

Although, if you tried something like this:

unsafe
{
    ImGui.GetIO().NativePtr->IniFilename = null;
}

It should have worked, if you do it before the first frame, in a _Ready or _EnterTree method.

But yeah, the config resource is the nice way, and that's working now. Just set Ini Filename to the empty string.