Created
May 14, 2017 16:31
-
-
Save muit/24770647a78535e7aee2b4b5a2138338 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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