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

FImGuiModuleCommands::SetKeyBinding does not work when using a child of UPlayerInput #68

Open
GBS3D opened this issue Jun 8, 2022 · 0 comments

Comments

@GBS3D
Copy link

GBS3D commented Jun 8, 2022

I have added an UpdatePlayerInput for all chld classes (DebugExecBindings.cpp) and it seems to work

// Update default player input, so changes will be visible in all PIE sessions created after this point.
if (UPlayerInput* DefaultPlayerInput = GetMutableDefault())
{
UpdatePlayerInput(DefaultPlayerInput, KeyBind);
for (TObjectIterator ClassIt; ClassIt; ++ClassIt)
{
if (ClassIt != UPlayerInput::StaticClass() && ClassIt->IsChildOf(UPlayerInput::StaticClass()))
{
UPlayerInput
DefaultChildPlayerInput = (UPlayerInput*)ClassIt->GetDefaultObject();
UpdatePlayerInput(DefaultChildPlayerInput, KeyBind);;
}
}
}

@GBS3D GBS3D changed the title FImGuiModuleCommands::SetKeyBinding does not work if UPlayerInput is created after plugin initialization FImGuiModuleCommands::SetKeyBinding does not work when using a child of UPlayerInput Jun 8, 2022
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