Is it possible to have a C++ function auto populate in the event graph like BeginPlay and Tick?

I tried looking in Actor.h and other Unreal Engine base classes but, I couldn’t seem to find anything. Is it possible to have void functions (Blueprint Events) show up in the Event Graph by default when they are created/opened for the first time? Similar to how events like BeginPlay or Tick are greyed out and exist when opening an Actor for the first time.

If you look in Actor.h you will find that BeginPlay is set up this way:

»   /** Event when play begins for this actor. */                                                                                                     »   UFUNCTION(BlueprintImplementableEvent, meta=(DisplayName = "BeginPlay"))                                                                          
»   void ReceiveBeginPlay();                                                                                                                                                                                                                                                                                
»   /** Overridable native event for when play begins for this actor. */                                                                              
»   virtual void BeginPlay();                                                                                                                         

So, mark your function as UFUNCTION(BlueprintImplementableEvent) and it will be possible to implement in the event graph. Note the specific behavior here where the display name is just BeginPlay and there is a separate C+±only virtual function of that same name. This is a pattern that comes back in a few places.

The documentation for function specifiers talks more about BlueprintImplementableEvent and others:

It’s not trivial, but it is possible. Assuming that you really, really, really, want behavior like BeginPlay or Tick with disabled nodes. If you just want predefined events that can go on the Event Graph, jwatte’s suggestion is a much better approach.

First you would need to make an Editor Module for your game/plugin. This is a pretty good writeup for creating new modules.
Next, during that module’s StartupModule implementation you can call FKismetEditorUtilities::RegisterAutoGeneratedDefaultEvent. The second parameter is the class you’re want to have default events on and the third is the name of the UFUNCTION to add to the event graph.
You’ll need some way to get the list of function names you want to include. I’ve usually added an EditorOnly static function to the class that they’re being registered for that returns an array of FNames. That array being filled out using calls to GET_FUNCTION_NAME_CHECKED so that it will generate compiler errors if/when the function is removed.

In my experience, these registered events will only show up on blueprints created after this code was added to the build (or whenever a new function name was added to the list of functions to create nodes for). There doesn’t seem to be an easy way to add them to blueprints that were existing before hand. I also haven’t found a way to easily bring them back if they get deleted (though the same thing is true for BeginPlay and Tick I believe).