segross / UnrealImGui

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

SImGuiWidget::OnKeyDown is not called unless SImGuiWidget has focus #78

Open ddbrown30 opened 1 year ago

ddbrown30 commented 1 year ago

If SImGuiWidget does not have focus, it will not receive calls to SImGuiWidget::OnKeyDown. This means that ToggleInput cannot be called which is what gives us focus in the first place. I'm not sure if something has changed in UE 5.1 as this appears to work in this tutorial video from 9 months ago on 5.0.1. https://youtu.be/qyO38jX5RU8

ceccocats commented 1 year ago

Same issue with unreal 5.2 i cant toggle with the keybinding. Any solution?

pupil1337 commented 1 year ago

Same issue with unreal 5.2 i cant toggle with the keybinding. Any solution?

My solution is no use the Shortcut keys, and switch imgui input enable when whether the GameViewport is in focus.

After running the window, pressing Shift+F1 or other methods will cause the window to lose focus, and the imgui input will be enabled; When clicking on the viewport, game operations will resume