필요한 개념
Interface에 있는 함수를 호출할 시에는 Execute_ 키워드를 해당 함수앞에 붙여주고, 인자로는 호출할 클래스를 넘긴다.
ICharacter.h (Unreal Interface)
더보기
class UE4PROJECT_API IICharacter
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
void ChangeColor(FLinearColor InColor);
virtual void ChangeColor_Implementation(FLinearColor InColor) {};
}
함수 호출 부분
더보기
// Interface 함수를 호출할 시에는 Excute_ 키워드를 붙여야 하고
// 인자로는 호출할 클래스를 넘긴다.
Execute_ChangeColor(this, FLinearColor(1, 0, 0, 1));
'Unreal Engine 4 > C++' 카테고리의 다른 글
<Unreal C++> 위젯에서 마우스 위치 구하기 (0) | 2022.06.20 |
---|---|
<Unreal C++> 89 - Action RPG (Map Positioning(맵에 배치)) (0) | 2022.06.07 |
<Unreal C++> 86 - Action RPG (Enemy Wizard AI) (0) | 2022.06.07 |
<Unreal C++> 78 - Action RPG (Enemy Melee AI) (0) | 2022.06.07 |
<Unreal C++> 73 - Action RPG (Inverse Kinemetics(IK)) (0) | 2022.06.07 |