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?

2 Likes

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.

6 Likes

Life saving info.

Also, if somebody eventually manages to transition a plugin from FEdMode to UEdMode, consider leaving a guide behind.

3 Likes

Uh I had the same issue, thank you very much!!

May I ask what’s the difference between FEdMode and UEdMode and why it would be interesting to transition?

1 Like