OnClicked not working in C++(works in bp)

Hi bwhhy,

I just put together a quick test and everything worked correctly. Perhaps the steps I used will help you:

  1. Launch UE 4.10.4; Create a new C++ project with Basic Code, Desktop/Console, Maximum Quality, and No Starter Content
  2. Add a Player Controller C++ class and use the default constructor so show the mouse cursor, and enable click and mouse-over events
  3. Open the C++ Game Mode class that was generated with the project and use the default constructor to set the default Player Controller class to my new class
  4. Edit the Project Settings to use the C++ Game Mode class (Maps & Modes → Default Modes → Default GameMode)
  5. Add a new Pawn C++ class with a click function that simply logs a message to the output log and registers that function in the default constructor
  6. Add a blueprint class derived from my C++ Pawn class and add a cube to its components
  7. Place one of my blueprint Pawns into the scene in front of the player
  8. Play the level, click the cube of my blueprint Pawn class, view the Output Log and see that the message appeared