I composed an AI using [Unreal Document Guide][1].
Then, I tried to make same thing using C++.
I wrote the C++ code :
UCLASS()
class GAME_API UEnemyAgroCheckService : public UBTService
{
GENERATED_BODY()
protected:
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Target", meta = (AllowProtectedAccess = "true"))
TSubclassOf<class AGameCharacter> PlayerCharacter;
FVector MyLocation;
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Target", meta = (AllowProtectedAccess = "true"))
FBlackboardKeySelector TargetToFollow;
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Target", meta = (AllowProtectedAccess = "true"))
FBlackboardKeySelector TargetLocation;
public:
UEnemyAgroCheckService();
virtual void TickNode(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds) override;
};
Compiling the code is successful but in behavior tree, the UPROPERTies aren’t reflected in details panel.
How can I edit the properties of the BTService in details panel? Creating Blueprint class based on the UBTService’s child class is invalid so I’m confused