I can’t manage to use AddDynamic in my constructor. It does not appear in the list and when i compile it, it says i need to define it and i get many errors.
What is this about?
Am i wrong to use it in the constructor?
Do i need to define it in some way?
I get this error:
Errore C2664 ‘void TBaseDynamicMulticastDelegate<FWeakObjectPtr,void,UPrimitiveComponent *,AActor *,UPrimitiveComponent *,int32,bool,const FHitResult &>::__Internal_AddDynamic(UserClass ,void (__cdecl ANPC:: )(UPrimitiveComponent *,AActor *,UPrimitiveComponent ,int32,bool,const FHitResult &),FName)’: cannot convert argument 2 from 'void (__cdecl ANPC:: )(AActor ,int32,bool,const FHitResult &)’ to 'void (__cdecl ANPC:: )(UPrimitiveComponent *,AActor *,UPrimitiveComponent *,int32,bool,const FHitResult &)’ GoldenEgg D:\Matteo\Progetti UE4\GoldenEgg 4.16\Source\GoldenEgg\NPC.cpp 18
I actually find it working when i renamed the function into “BeginOverlap”. I am kinda new to ue4 but it think this is silly since the funcion is not a primitive function of any base class (i guess) . So if i let the definition correct and refactor the name, it doesn’t work anymore. Why is that? Can’t i just call the function as i want?
I think it was “ProxSphereOverlap” or something like this. However i changed it many times and only with the name “BeginOverlap” it works. As i said if i change just the name of the function leaving the definition correct, it seems to not work anymore.
I think it was “ProxSphereOverlap” or something like this. However i changed it many times and only with the name “BeginOverlap” it works. As i said if i change just the name of the function leaving the definition correct, it seems not to work anymore.
I am new to UE4, how do i delete those files you talk about?
PS: i posted only these lines of code cause the whole code required too many characters and i couldn’t post it.
Closing down UE4 and launching it again seems to fix the problem. I’m guessing its a caching issue. Annoying, but great to have found a consistent solution.