작성
·
91
2
Subsystem->AddPlayerMappableConfig(Pair.Config.LoadSynchronous(), Options);
5.5 버전에서는 해당 함수가 없어진 것 같습니다. 그래서
for (const FLyraCloneMappableConfigPair& Pair : DefaultInputConfigs)
{
if (Pair.bShouldActivateAutomatically)
{
FModifyContextOptions Options = {};
Options.bIgnoreAllPressedKeysUntilRelease = false;
// 내부적으로 Input Mapping Context를 추가한다:
// - AddPlayerMappableConfig를 간단히 보는 것을 추천
for (const auto ConfigObject = Pair.Config.LoadSynchronous(); const auto& MappingContextPair : ConfigObject->GetMappingContexts())
{
const UInputMappingContext* MappingContext = MappingContextPair.Key;
const int32 Priority = MappingContextPair.Value; // 우선순위 값도 가져옵니다
Subsystem->AddMappingContext(MappingContext, Priority, Options);
}
}
}
이렇게 해주시면 5.5에서도 정상적으로 실습이 됩니다.