I added to some function to LevelEditor Toolbar by in custom plugin like this,
UI_COMMAND(DoMyAction, "My Button", "Displays a message in output log", EUserInterfaceActionType::Button, FInputChord(EKeys::R, false, true, true, false));
So, It was working well when I clicked specific button in level editor toolbar, but not working with shortcut key(Ctrl + Alt + R).
How can I fix this?
please help me.
thank you.
If you are starting from the toolbar example, add this line to the StartupModule() method:
LevelEditorModule.GetGlobalLevelEditorActions()->Append(PluginCommands.ToSharedRef());
You need to get a reference to the LevelEditorModule first:
FLevelEditorModule& LevelEditorModule = FModuleManager::GetModuleChecked<FLevelEditorModule>( TEXT("LevelEditor") );
LevelEditorModule.GetGlobalLevelEditorActions()->Append(PluginCommands.ToSharedRef());
2 Likes