게임개발/Unreal Engine
[UE5] C++ AActor::Destroy() not working in BeginPlay()
깜냥c
2025. 2. 6. 16:11
언리얼 개발 도중 액터를 파괴하려 Destroy를 호출했으나 작동하지 않았다.
다른 액터에서는 잘 되었는데 BeginPlay에 넣은 Destroy()만 안됐다.
호출 시점이 문제인건가, 아니면 다른 것이 문제인건가 고민하다 아래 링크를 발견했다.
https://www.reddit.com/r/unrealengine/comments/jt5s61/c_aactordestroy_not_destroying_actor/
From the unrealengine community on Reddit
Explore this post and more from the unrealengine community
www.reddit.com
C++에서 Super::BeginPlay()를 호출해야 정상적으로 작동한다는 말이 있어 그대로 적용해보았고 해결되었다!
되도록이면 상속받은 클래스는 Super:: 함수를 호출해주도록 하자.