You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);;
}
}
}
The text was updated successfully, but these errors were encountered:
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
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);;
}
}
}
The text was updated successfully, but these errors were encountered: