Compile errors for Delegates when Migrated to 4.6 Version

After moving the code base to 4.6 version from 4.5.1 version, I get compile error for Dynamic Multicast delegate

Error:
Error 9 error C2660: ‘FStaminaEventDelegate_DelegateWrapper’ : function does not take 2 arguments d:\Project\public\AttributeEvent.h 78 1

My code is declaring delegate as:

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FStaminaEventDelegate, float, AttrValue);
UCLASS(Blueprintable)

class LSF_API ULSFAttributeEvent : public UActorComponent
{
UPROPERTY(BlueprintAssignable)
FStaminaEventDelegate OnNotifyStamina;
}

Is there change in Multicast delegate, i tried keeping only float keyword only, removing the comma after float, rebuilding the engine but the error still remains the same.

NOTE: I got rid of all deprecated methods so I get no warnings except for GetMesh,

help if someone already fixed this issue

Hi! The _DelegateWrapper is a function generated by UHT. Is it possible that you’ve got an out of date generated header somehwere? Try a clean and rebuild to see if that sorts it out.

Failing that, are there any earlier compile errors about unknown types or the like?

I cleaned the code and rebuilt twice, however the project is from 4.5.1 and it generates new generated.h file when i switch the engine version from 4.5 to 4.6, Yes there are compile errors of unknown types as in other delegates i have used Enum types, does the declaration of delegates and enums out of class giving any errors in 4.6 any ideas?

We’ve had a report of unknown enum types in dynamic delegate declarations - in that instance the issue was caused by the generated header being included before the enum definition. We solved this by either forward declaring the enum (for C++11 enum classes), or by ensuring the enumeration is defined before the header is included.

If you could make sure there are no ‘unknown type’ errors, hopefully this will sort out the _DelegateWrapper issue.

Thanks Andrew!!!

moving only one line of generated.h file below Enum declaration solved the issue and 53+ compile errors

Great! Often an unrecognized type like this can cause an explosion of compile errors!