segross / UnrealImGui

Unreal plug-in that integrates Dear ImGui framework into Unreal Engine 4.
MIT License
666 stars 211 forks source link

Any plans to update to latest ImGui? #42

Open fp12 opened 3 years ago

fp12 commented 3 years ago

Hey @segross, thanks for your work!

Is there any plans to update core ImGui?

Thanks!

segross commented 3 years ago

Hi @fp12. I should update, but I'm loaded with work and not really looking at this right now. Before I update, I want to fix two bugs that I've noticed recently. And although I don't expect problems there, I will need to check whether that is compatible with the other branch which is using NetImgui (merging still in progress because I found some issues).

However, unless there is a major change in the ImGui, updating should be as simple as copying over files to ThirdParty/ImGuiLibrary. Not sure whether I wrote in it the readme but that was the intent. I'm intentionally not adding custom extensions, to make that process easier. The only thing to keep in mind is that the public headers need to go to the public directory and implementations to the private one.

If however, you have a problem with that, let me know and I'll look at this as soon as I have a moment.

Edstub207 commented 3 years ago

@segross BTW, I ran into one issue when using the latest version of ImGui (ImGuiDrawData.cpp Line 62, Src.Clear(); is now Src._ResetForNewFrame();)

nathanielchapman commented 2 years ago

Hi! We tried this and it seems like Unreal is having a hard time picking up the new imgui_tables.cpp file. Unsure what specifically we need to do to get that to work, but for now the problem is showing up as a bunch of linker errors - it's hard to know though whether or not there's an additional step we need other than just rebuilding the project after updating the imgui source files.

e.g. Module.ImGui.cpp.obj : error LNK2019: unresolved external symbol "bool __cdecl ImGui::BeginTable(char const ,int,int,struct ImVec2 const &,float)" (?BeginTable@ImGui@@YA_NPEBDHHAEBUImVec2@@M@Z) referenced in function "void __cdecl ImGui::ShowDemoWindow(bool )" (?ShowDemoWindow@ImGui@@YAXPEA_N@Z)

sammyfreg commented 2 years ago

To get around some issues, the compilation of Dear Imgui's source files is done by manually including them in ImGuiImplementation.cpp. Make sure the new source file imgui_tables.cpp is also added around line 50.

sammyfreg commented 2 years ago

Alternatively, the NetImgui branch already has the table support (version 1.80), plus the remote Dear ImGui access built-in.

nathanielchapman commented 2 years ago

To get around some issues, the compilation of Dear Imgui's source files is done by manually including them in ImGuiImplementation.cpp. Make sure the new source file imgui_tables.cpp is also added around line 50.

Thanks!

WiggleWizard commented 2 years ago

I've updated to ImGui 1.87 (along with a trivial update for UE5 and added ImPlot). If anyone's interested the repo is here: https://github.com/WiggleWizard/UnrealImGui. I can't thank UnrealImGui's author and contributor's enough for providing this project; it's helped a ton of people out!

I might do a pull request at some point in time without the ImPlot library...unless the author is ok with its inclusion.

mmannj commented 2 years ago

I have updated my project to ImGui v1.88 and now I have this error: error LNK2019: unresolved external symbol "declspec(dllimport) bool cdecl ImPlot::BeginPlot(char const *,struct ImVec2 const &,int)"

Projects builds with ImGui v1.87 but has linker error with the new version of ImGui

Any thoughts?

sammyfreg commented 2 years ago

This is one possibility:

The way the ImGui and Plot cpp file are compiled is unusual. Instead of being given to the build process, they are directly included inside 'ThirdPartyBuildImGui.cpp' (because of some Unreal build process limitations). This causes the build system to not detect when those files have been updated. You need to either clean rebuild the plugin, or make a small change to 'ThirdPartyBuildImGui.cpp' so that the files it includes are also rebuilt.

On Thu, Jul 21, 2022 at 3:45 AM mmannj @.***> wrote:

I have updated my project to ImGui v1.88 and now I have this error: error LNK2019: unresolved external symbol "bool __cdecl ImPlot::BeginPlot(char const *,struct ImVec2 const &,int)"

Projects builds with ImGui v1.87 but has linker error with new version of ImGui

Any thoughts?

— Reply to this email directly, view it on GitHub https://github.com/segross/UnrealImGui/issues/42#issuecomment-1190630545, or unsubscribe https://github.com/notifications/unsubscribe-auth/AESBPY6EIU7MJHZIRNNIEEDVVBCLJANCNFSM4TI2BJUA . You are receiving this because you commented.Message ID: @.***>

jonpas commented 2 years ago

https://github.com/IDI-Systems/UnrealImGui is now on Dear ImGui v1.88, among other changes (Unreal Engine 5 support, ImPlot etc.).