How to access the persistent listener gameobjects on a button?

Hello. I am wondering if it is possible to do what I ask. Lets say I have a button with 3 persistent listeners (all gameobjects) which I have dragged and dropped into the button’s fields from the inspector. How can I then reference these gameobjects in code? Thank you for reading.

You can’t access the gameObject itself, not event the component where the function is declared.

The only thing you can do is to change/add/remove the callback of the event using the UnityEventTools class, but keep in mind that this class is declared inside the UnityEditor namespace, thus, making it inaccessible from a built game.

However, if you could explain what you are really trying to do, another solution can be found maybe.