강의

멘토링

커뮤니티

Inflearn Community Q&A

gamble's profile image
gamble

asked

[Rookiss University] UE5 Lyra Clone Coding (Haker)

Input #2

5.5 에서 AddPlayerMappableConfig를 대체할 함수

Written on

·

124

3

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

c++unreal-engine

Answer 1

0

Liu님의 프로필 이미지
Liu
Instructor

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

gamble's profile image
gamble

asked

Ask a question