Skip to content

Instantly share code, notes, and snippets.

@muit
Created May 14, 2017 16:31
Show Gist options
  • Save muit/24770647a78535e7aee2b4b5a2138338 to your computer and use it in GitHub Desktop.
Save muit/24770647a78535e7aee2b4b5a2138338 to your computer and use it in GitHub Desktop.
#include "MyEditorPrivatePCH.h"
#include "Kismet2/KismetEditorUtilities.h"
DEFINE_LOG_CATEGORY(LogMyEditor)
#define LOCTEXT_NAMESPACE "MyEditor"
void FMyEditorModule::StartupModule()
{
UE_LOG(LogMyEditor, Warning, TEXT("MyEditor: Log Started"));
// Our editor module will be loaded here
// Registry our auto generated event nodes
PrepareAutoGeneratedDefaultEvents();
}
void FColonieEditorModule::ShutdownModule()
{
UE_LOG(LogMyEditor, Warning, TEXT("MyEditor: Log Ended"));
// Cleanup all auto generated event nodes created by this module
FKismetEditorUtilities::UnregisterAutoBlueprintNodeCreation(this);
}
void FColonieEditorModule::PrepareAutoGeneratedDefaultEvents()
{
/**
* Registering custom events is as easy as writing
* the class and the name of the event.
*
* Keep in mind that we need the native name, inside c++ */
RegisterDefaultEvent(AMyActor, MyEvent);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment