Change Unity UI Button parameters. Object and method

I was wondering if there is a way to change a buttons parameters? I need to change the “object” and the “method” under the “OnClick()”.

I have googled it and found how to change the method but not the object parameter under the “OnClick()”.

is this possiable?

If you need to dynamically change callback target, it may be easier to add event callback from code entirely instead of using Editor:

void ChangeCallback() {
    button.onClick.AddListener(() => {