segross / UnrealImGui

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

Handle project overrides of PlayerInput class #52

Open tony-hinterland opened 3 years ago

tony-hinterland commented 3 years ago

Using plugins like the Enhanced Input, you change the PlayerInput class to something that might not be loaded when ImGui is trying to bind settings for things like the F10 debug key. This change does two things:

  1. Asks for the default player input class from the engines UInputSettings.
  2. Delays trying to bind until after the plugin manager has completed the PreDefault stage (which is when both ImGui and EnhancedInput are loaded).