(Delegates) AddRaw() Error after upgrading to UE5.1

After moving my code from a 4.27 to 5.1 i get this Error:

E0304|no instance of overloaded function TMulticastDelegate<void (ParamTypes...), UserPolicy>::AddRaw [with ParamTypes=<FRDGBuilder &, const FSceneTextures &>, UserPolicy=FDefaultDelegateUserPolicy] matches the argument list


even though the definition in the engine code didnt change between versions.

It asks for VarTypes…Vars but i cant figure out what to put there as third argument.


I cant find anything online about it. Every example just uses the two arguments like I did before. And it worked in 4.27. The engine version is the only thing thats different.

In case its relevant: Visual Studio also gives me a bunch of errors for engine code that is precompiled and I never touched, installed through the epic games launcher.

Im not that experienced with C++ so maybe the problem lies somewhere else entirely.
I would appreciate any input that could help to solve this problem. Many thanks in advance!

You need to fix the engine code errors first.

Try this:

Hopefully that will fix your engine errors. Did you migrate your project using Unreals migration tool?

Thanks for the reply! That is probably the way to go.
But after some more experimentation I found out that the engine errors actually come up in every new project I create in Unreal 5. thats both 5.1 and 5.0.3.

I tried everything in this thread but nothing fixed it:

Disabling live coding as well as using the visual studio integration plugin did nothing
I installed VS2019 but that also did not make a difference. I even tried using Rider for Unreal. There it did not show any engine errors but the AddRaw() was still there.

I am somewhat out of Ideas now. Any input would be greatly appreciated!