Getting button event data

Hi All,

I spent the last 2 hours googling for it but i am stuck.

I have a canvas interface for recruiting heroes in a tavern. Each hero is displayed automatically by loading those available, then showed as a button in the screen.

What i would like to do it retrieve the informations about the button accessed by the pointer. Following some examples i got to a decent point and from there on i am completely stuck.

First in the initialization i init the events and callback for each of the buttons

foreach(RectTransform elem in children){
            if(elem.tag=="heroPortrait"){
                portraits.Add(elem.GetComponent<Image>());
                EventTrigger trig = elem.gameObject.GetComponent<EventTrigger>();
                AddEventTrigger(trig,OnPointerEnter,EventTriggerType.PointerEnter);
                AddEventTrigger(trig,OnPointerExit,EventTriggerType.PointerExit);
            }else if(elem.tag=="tooltip"){
                ttp = elem.GetComponent<ToolTip>();
            }

this is where i add the trigger

private void AddEventTrigger(EventTrigger evTrig, UnityAction<BaseEventData> action, EventTriggerType triggerType){
        EventTrigger.TriggerEvent trigger = new EventTrigger.TriggerEvent();
        trigger.AddListener((eventData) => action(eventData)); 
        EventTrigger.Entry entry = new EventTrigger.Entry() { callback = trigger, eventID = triggerType };
        evTrig.delegates.Add(entry);
    }

and this is the callback (just debugging at the moment). The dataObject is always null, there is probably something stupid that i don’t get, but i don’t see where. any hint?

private void OnPointerEnter(BaseEventData dataObject){
        Debug.Log(dataObject.selectedObject.name);
        ttp.SetTooltip(" - "+dataObject.selectedObject.name);
    }

thanks in advance
best,
H

Ok, i saw that it’s a known issue, and the click of the mouse makes it work, I will be waiting for fixes then. Cheers and sorry for overposting it