강의

멘토링

커뮤니티

Inflearn Community Q&A

159rjsgml8549's profile image
159rjsgml8549

asked

[Rookiss University] UE5 Lyra Clone Coding (Haker)

GameFeatureAction_AddInput #2

AddExtensionHandler 질문

Written on

·

113

0

TSharedPtr<FComponentRequestHandle> ExtensionRequestHandle = ComponentMan->AddExtensionHandler(APawn::StaticClass(), AddConfigDelegate);

이 함수가 모든 Pawn에 적용된다면 적 몬스터같은 Pawn에도 바인딩이 될텐데 Pawn의 StaticClass가 아닌 플레이어 캐릭터의 StaticClass()를 쓰면 될까요?

c++unreal-engine

Answer 1

1

Liu님의 프로필 이미지
Liu
Instructor

Lyra의 경우 몬스터 같은 개념이 없는 FPS라서 이렇게 작업했지만 말씀하신대로 몬스터 같은 개념이 있다면 PlayerCharacter의 StaticClass를 사용하면 더 좋겠죠 ㅎㅎ

159rjsgml8549님의 프로필 이미지
159rjsgml8549
Questioner

답변 감사합니다. 한가지만 더 질문하고 싶습니다. HeroComponent에서 UGameFrameworkComponentManager::SendGameFrameworkComponentExtensionEvent 함수를 호출했기 때문에 캐릭터만 사용할 경우에는 TSharedPtr<FComponentRequestHandle> ExtensionRequestHandle = ComponentMan->AddExtensionHandler(APawn::StaticClass(), AddConfigDelegate); 이 델리게이트를 바인딩 할 필요가 없어지는 거죠??

Liu님의 프로필 이미지
Liu
Instructor

델리게이트는 동일하게 바인딩 하셔야 합니다.

UGameFrameworkComponentManager::SendGameFrameworkComponentExtensionEvent를 통해서 현재 입력에 대한 등록이 가능한 시점이라는 것을 알려주게되면 델리게이트를 통해 Mapping Context 등록을 시작하게 됩니다.

159rjsgml8549's profile image
159rjsgml8549

asked

Ask a question