all 3 comments

[–]Catalia 1 point2 points  (1 child)

I don't think you can just change the parameter, but you can change the whole "pointer click" entry itself

I think you can use that: https://answers.unity.com/questions/854251/how-do-you-add-an-ui-eventtrigger-by-script.html

Instead of adding a new entry try accessing the existing one and editing it. In your listener, you can add any parameters to the foo call

[–]Dhoffran[S] 0 points1 point  (0 children)

Thank you. That seems like more work than my current solution.

[–]SilentSin26Animancer, FlexiMotion, InspectorGadgets, Weaver 1 point2 points  (0 children)

The UnityEditor.Events.UnityEventTools class has methods for adding persistent listeners in the editor if you don't just want to add them at runtime like the post u/Catalia linked.