i am working on a unit selection freature, and have
URTSSelectable : public UActorComponent
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category = “RTS Selection”)
void OnSelected();
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category = "RTS Selection")
void OnDeselected();
};
but when i got an actor BP have this AC attached, actor can’t implement the AC methods OnSelected, but i subclass use Selectable subclass URTSSelectable , it will show in the Selectable event graph. so what’s wrong? just because actor is not subclass of AC?
how can i override functions in actor? i hate AC → getOwner → cast to → call function, cast to is so bad.