강의

멘토링

로드맵

Inflearn brand logo image

인프런 커뮤니티 질문&답변

토토님의 프로필 이미지
토토

작성한 질문수

[Rookiss University] UE5 Lyra 클론 코딩 (Haker)

Input #2

5.5 에서 AddPlayerMappableConfig를 대체할 함수

작성

·

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에서도 정상적으로 실습이 됩니다.

답변 1

0

Liu님의 프로필 이미지
Liu
지식공유자

감사합니다. 결국 5.5버전에서 변경되었군요!

토토님의 프로필 이미지
토토

작성한 질문수

질문하기