Skip to content

Instantly share code, notes, and snippets.

@muit
Last active June 17, 2019 15:13
Show Gist options
  • Save muit/b85fa235da34507c0ab8cb012427dc9f to your computer and use it in GitHub Desktop.
Save muit/b85fa235da34507c0ab8cb012427dc9f to your computer and use it in GitHub Desktop.
Registering Default Blueprint Nodes
#pragma once
#include "MyEditorPrivatePCH.h"
DECLARE_LOG_CATEGORY_EXTERN(LogMyEditor, All, All)
class FMyEditorModule: public IModuleInterface
{
public:
virtual void StartupModule() override;
virtual void ShutdownModule() override;
private:
/**
* Define all of our default events for this Editor
*/
void PrepareAutoGeneratedDefaultEvents();
/**
* Simplify Registering default events with a macro
* @param Class - Name of the UObject or AActor class
* @param FuncName - Name of the Event of Function to register
*/
#define RegisterDefaultEvent(Class, FuncName) \
(FKismetEditorUtilities::RegisterAutoGeneratedDefaultEvent(this, Class::StaticClass(), GET_FUNCTION_NAME_CHECKED(Class, FuncName)))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment