https://forums.unrealengine.com/t/c-uproperty-actor-component-variable-being-set-to-null/413170/7
C++ UPROPERTY actor component variable being set to null
I had the same problem, but changing tags in the UPROPERTY did not fix it. I ended up having to change the name of the component variable. PlayerEquipment = CreateDefaultSubobject<UEquipmentComponent>(TEXT("PlayerEquipment")); to PlayerEquipment2 = CreateD
forums.unrealengine.com
이 문제로 인해 이틀을 헤맸다. 언리얼 못됐어 ㅠㅠ
생성자에서 CreateDefualtSubObject로 생성한 ActorComponent 클래스가, BeginPlay 이후에 null로 잡혀서 생긴 문제이다.
언리얼 자체 버그로,
AMLPlayerController를 상속받은 블루프린트클래스를 쓰고 있었는데, 그 내부 데이터 InputProcessComponent가 손상되어서(아마 UProperty 지정자를 바꾸면서 손상된 것 같다) 런타임 중 해당 데이터가 무조건 null로 잡히는 버그였다.
이름을 바꿔서 하나 더 만들어주니까 손쉽게 해결. 진작에 바꿔서 해볼걸 ㅠ
'Unreal > 개인플젝' 카테고리의 다른 글
업데이트 (0) | 2023.11.24 |
---|---|
이벤트시스템 (1) | 2023.11.24 |
인풋컨포넌트 분리함 (0) | 2023.09.04 |
[언리얼] 3번째. 스포너 (0) | 2023.09.02 |
개인플젝 시작했다 (0) | 2023.08.31 |