Edit: Before I found the setting mentioned by OP and thought it was hard-coded, I found out you can bind to the FBindingContext::CommandsChanged
event and override it there. You need to make sure this happens early enough, since it’ll only trigger once at editor startup. I did it in a UDeveloperSettings
object so I could customize the binding, but you can probably figure out the right incantation to do it without such an object.
Sample:
#if WITH_EDITOR
void UMyDevSettingsObject::OnCommandsChanged(const FBindingContext& BindingContext)
{
if (BindingContext.GetContextName().IsEqual("PlayWorld", ENameCase::IgnoreCase))
{
FPlayWorldCommands& Commands = (FPlayWorldCommands&)BindingContext;
Commands.StopPlaySession->SetActiveChord(MyCustomOverrideBinding, EMultipleKeyBindingIndex::Primary);
}
}
#endif
void UMyDevSettingsObject::PostInitProperties()
{
Super::PostInitProperties();
#if WITH_EDITOR
FBindingContext::CommandsChanged.AddUObject(this, &UMyDevSettingsObject::OnCommandsChanged);
#endif
}
Though the existing setting OP uses is probably best.