I have the following declarations in PlayerState.h with the appropriate definitions in PlayerState.cpp:
UFUNCTION(BlueprintCallable, Server, Reliable, WithValidation)
void RequestSetMinionTargetPosition(const AMinionManager& MinionMgr, const FMinionsGroup& Group, FVector TargetPosition);
virtual bool RequestSetMinionTargetPosition_Validate(const AMinionManager& MinionMgr, const FMinionsGroup& Group, FVector TargetPosition);
virtual void RequestSetMinionTargetPosition_Implementation(const AMinionManager& MinionMgr, const FMinionsGroup& Group, FVector TargetPosition);
Compiling gives the following error:
error : Missing '*' in Expected a pointer type
When I try to address the problem and change the refs for pointers in the declarations:
UFUNCTION(BlueprintCallable, Server, Reliable, WithValidation)
void RequestSetMinionTargetPosition(const AMinionManager* MinionMgr, const FMinionsGroup* Group, FVector TargetPosition);
virtual bool RequestSetMinionTargetPosition_Validate(const AMinionManager* MinionMgr, const FMinionsGroup* Group, FVector TargetPosition);
virtual void RequestSetMinionTargetPosition_Implementation(const AMinionManager* MinionMgr, const FMinionsGroup* Group, FVector TargetPosition);
I get this error instead:
error : Inappropriate '*' on variable of type 'FMinionsGroup', cannot have an exposed pointer to this type.
I understand the second error, since pointers cannot be exposed in the blueprints, but why is it asking for pointers when I declare my functions with refs?
Note: The error shows up whenever the UFUNCTION is present, even if it’s empty. If I remove the UFUNCTION, then the compiling starts.