Hello. Can somebody please show me example how I can do this ?
Basically I am talking about callback functions.
Let’s say
Class A is moving some object.
Class B needs to know when the moving is finished.
I need to pass some method from class B to A. And that method will be called when Class A finish the movement.
FOnSetLocation AFreeCam::GetLocationCallback()
{
return __onSetLocation;
}
// Then if object is set to location
if (__onSetLocation.IsBound())
{
__onSetLocation.Broadcast();
}
So In this case __onSetLocation.IsBound() Returns always 0. So __onSetLocation.Broadcast(); Do nothing
As I said everything works only if everything is in one class.
It does work in mutiple class, I do it myself. Teh way you do it with a getter, I believe you get a copy, not the reference. Lose the getter for your test.