Hello, I’m trying to get up and running with mainly c++ in UE4. However, I find it pretty difficult to find an up to date reference. For example, I wanted to add an overlap listener to a component, and found this:
However, OnComponentBeginOverlap.AddDynamic does not exist in my header files.
I ran into this kind of thing quite a bit over a short period of time trying to figure fairly simple things out. The documentation is unversioned and sometimes seems out of date.
The AddDynamic (Make sure it is capital A on the Add) is a way to bind a function to the event (OnComponentBeginOverlap). The OnComponentXXXXX need to be used on a component class, for example USphereComponent will have the OnComponentBeginOverlap. There is an OnActorBeginOverlap which is used for when something overlaps your actor.
The function you add also needs to have the same parameter definitions as those in the documentation or it will fail to compile.