OnClicked.AddDynamic(this, &AChessPiece::OnClick); // <- In AChessPiece's constructor
I have declared OnClick in the ChessPiece.h
Defined it in ChessPiece.cpp
When ever I try to build this I get an error saying that there is “No matching member function for call to ‘__Internal_AddDynamic’” I have been utterly unsuccessful in determining the cause of this error. Here is the debug info provided by the editor:
Thank you that works, I am confused though. If the class I am trying to get to react to clicking is a pawn should I change AActor to APawn? Also would you be able to explain the need for those parameters? In most of the examples I see on other posts they are not needed.