I Use UE4.16.2.
I face to a crazy problem with adding AIPerception component by c++. When I try to add this component with c++ it doesn’t show detection by affiliation but I do this by blueprint so it works perfectly and shows all of them.
c++
blueprint
My C++ code :
.h
UPROPERTY(EditAnywhere, Category = Components)
UAIPerceptionComponent* AIPerceptionComp;
.cpp
AIPerceptionComp = ObjectInit.CreateDefaultSubobject<UAIPerceptionComponent>(this, "AIPerceptionComp");
What should I do to fix this?