소환사 원리(Delegate)

REWELLGOM·2024년 7월 3일

Unreal5

목록 보기
14/26

Delegate:대리자

1.Pawn에 대한 참조를 가져와야함

2.Pawn에 포인터를 보내면 포인터를 통해 Delegate에게 접근해서 미니언을 불러옴

3.Delegate 목록에 추가가됌

4.Brodadcast()를 통해서 값을 전달하고 그 값으로 함수에 넣음

Udemy

바인딩 하는방법

void AItem::OnSphereOverlap(UPrimitiveComponent*, OverlappedComponent, AActor*, OtherActor, UPrimitiveComponent*, OtherComp, int32, OtherBodyIndex, bool, bFromSweep, const FHitResult &, SweepResult)

PrimitiveComponent.h파일에서 복붙할수 있음

profile
코테는 초딩한테 이해하기 쉽게 문제 해설해주는거다

0개의 댓글