Hello, I have some trouble with type alias in unreal, and here is my code:
typdef APawn ATarget;
// do something
UFUNCTION(BlueprintImplementableEvent)
ATarget* GetTarget();
That not work. Compiler bring out a error “Unrecognized type ‘ATarget’ - type must be a UCLASS, USTRUCT or UENUM”
I tried using ATarget = APawn
and even #define ATarget APawn
, but code still not worked.
What’s wrong inside? How to use type alias correctly?
Thanks.