Download

Can't register my custom Editor Mode

Hi everyone, I am currently working on upgrading my Plugin to UE5.
The one thing that I can’t get to work, is my custom Editor Mode. No matter which direction I follow, I end up running in the same “unresolved external symbol … FEditorModeInfo::FEditorModeInfo(…” error upon compilation during the registration step.

It seems that with UE5 you are encouraged to inherit from UEdMode as showcased in the “SampleToolsEditorMode.h”. I’ve tried this route and when I try to set the Info, I get to the crash.

	Info = FEditorModeInfo(
		Id,
		FText::FromString("Automation"),
		Icon,
		MoveTemp(IsEnabledAttr),
		600);

If I revert it and inherit from FEdMode, I run into the error when I call “FEditorModeRegistry::Get().RegisterMode<…>(…);”.

	FEditorModeRegistry::Get().RegisterMode<FArin_AutomationMode>(
		FArin_AutomationMode::EM_Automation,
		FText::FromString("Automation"),
		FSlateIcon(
			FArin_EditorStyle::GetStyleSetName(),
			"ArchInteractionEditor.Rocket",
			"ArchInteractionEditor.Rocket.Mini"),
		true);

Has anyone gotten an EditorMode to run in UE5?

After moving the “UnrealEd” module to the PublicDependencyModuleNames and adding “EditorFramework” and “LevelEditor”, it compiles. I was able to find these modules through the Steam Audio plugin, which also has a nice, minimal EditorMode implemented.