I create empty Blank project with 4.26.2, I select target platform as Windows 64 in Project Setting, I run package. All good.
I add either default C++ class based on None or I enable OnlineSubsystemSteam, I restart - I get this in Editor Output log: https://pastebin.com/raw/EApAa1Ab
If I try to create C++ based project instead it will fail immediately with the same error.
I clear uproject file to the state it was right after project creation and try to re-open - no dice, it is now forever stuck with thew same damned error:
2>D:/UE_4.26/Engine/Source/Developer/ToolMenus/Public/ToolMenuDelegates.h(34): error : Unable to parse delegate declaration; expected 'DECLARE_DYNAMIC_DELEGATE' but found 'DECLARE_DYNAMIC_DELEGATE_OneParam'.
So basically enabling some plugins or adding c++ classes is a destructive action in this case and there is noway to recover.
That’s not the problem… The problem is that some of your engine code looks incorrect, and those actions are causing some of the engine code to be compiled.
It sounds like you should either delete UnrealEngine and reinstall it, or I guess you could try replacing line 34 of that file with: DECLARE_DYNAMIC_DELEGATE_OneParam(FToolMenuDynamicExecuteAction, const FToolMenuContext&, Context);
– you would need to recompile the whole engine for that, and there may be more than one such error.
This sounds like your installation is broken somehow, did you install this as a C++ project to begin with? Also “C++ class based on none”? That doesn’t make much sense in Unreal context.
I didn’t say there was a problem during compilation… I’m just saying the code itself doesn’t match up.
In Line 34 of Engine/Source/Developer/ToolMenus/Public/ToolMenuDelegates.h in 4.26 and 5.0 for me it is: DECLARE_DYNAMIC_DELEGATE_OneParam(FToolMenuDynamicExecuteAction, const FToolMenuContext&, Context);
But for you it sounds like it is: DECLARE_DYNAMIC_DELEGATE(FToolMenuDynamicExecuteAction, const FToolMenuContext&, Context);
I have no idea how it happened, I just know it is the case. So, as I stated earlier, you could try to “fix” the engine source code, or you could try to get a new clean installation.
Quick necro here, had this issue after converting a blueprint project to a c++ by adding a class in via the UE editor.
Close the Editor(s), Right click the Engine version (in my case 5.5.3) and choose “Verify”. takes a little bit(or a long bit) but after it was done, i could open the .sln file and click the play button and it worked.