Bind UFunction to Widget Event with Input Variable on Runtime ue4 c++?

Hello Friends,

I’m currently trying to bind a UFunction to a UImage that I create on runtime.
I would like to bind an aactor to the UImage input function, but cannot figure out how to pass that reference on runtime…

Does anyone know how to append an object reference to .BindUFunction?
Subsequently, I think I could work around this if I knew how to get the name of the widget that was clicked from c++.

Thank you for your time!

Here’s my current code:

void MyClass::CreateBlips() {
        int i = 0;
        for (AActor* Actor: AllActors) {
            UImage *newBlip= DuplicateObject<UImage>(originalBlip, this, FName(TEXT("%d"),i));
    
            newBlip->OnMouseButtonDownEvent.BindUFunction(this, FName("BlipMouseDown"));
           i++
        }
    }
    
    FEventReply MyClass::BlipMouseDown(FGeometry geo, const FPointerEvent& fevent, AActor* MyActor)
    {
        //get according actor referenced to clicked uImage
    	UE_LOG(LogTemp, Warning, TEXT("Actor corresponding to blip is %s"), *MyActor->GetName());

    	return FEventReply(false);
    }

OnMouseButtonDownEvent has so few data, I would make a child class with :

a public weak pointer to an actor

and new “OnClicked” event that pass the newImage object (this) as arg

this class would subscribe to it’s own “OnMouseButtonDownEvent” and broadcast the new event from here with the data