Search Issue Tracker

Fixed in 2020.1.X

Fixed in 2018.4.X, 2019.2.X, 2019.3.X

Votes

8

Found in

2019.2.1f1

2019.2.5f1

2019.3.0a12

2020.1.0a1

Issue ID

1178687

Regression

Yes

UnityEvent drawer no longer handles events in non-public fields correctly

uGUI

-

How to reproduce:
1. Open the attached "Event_Listener_Bug.zip" project
2. Open "SampleScene"
3. Select the "Listener" in the Hierarchy
4. In the Player Input component inspector, open the "Events" and "Player" foldouts
5. Try to set the Fire() event listener to Script.Click()

Expected results: The Script.Click() method can be chosen
Actual results: Only static parameters can be chosen

Reproducible with: 2019.2.7f1, 2019.3.0b1, 2020.1.0a2
Not reproducible with: 2018.4.7f1, 2019.2.3f1, 2019.3.0a11

Comments (24)

  1. madTeddy

    Oct 07, 2019 14:46

    Yep, same problem in 2018.4.10f1

  2. Elringus

    Oct 05, 2019 16:22

    2019.2.8f1 patch didn't fix the issue completely. Some methods are still missing, eg can't assign Animator.SetTrigger(string) to a UnityEvent<string> so that the event argument is automatically routed to the handler.

  3. P_Jong

    Oct 05, 2019 14:33

    This is now fixed for me in Unity 2019.2.8f1. But I had to re-build a lot of my Script.Click() methods. Not all but many of them. Can anyone else validate this?

  4. MichaelHeiml82

    Oct 04, 2019 09:40

    Also happens in 2018.4.10f1

  5. pnelsonic

    Oct 03, 2019 20:25

    Also occurs in 2018.4.9f1

  6. LeFlown

    Oct 02, 2019 17:38

    Issue still present for me on 2019.3.0b1, 2019.3.0b3, 2019.3.0b5 and 2020.1.0a5...

  7. Colin_MacLeod

    Oct 01, 2019 16:10

    Occurs in 2019.2.7f1

  8. Arkade

    Sep 24, 2019 09:47

    Workaround:
    Set up the event as normal using static parameter approach them switch to inspector to debug mode and set the event's ”Mode” to ”Event defined”.
    It'll show as ”missing” on return to ”non-debug” mode but it still works.
    HTH

  9. mirage3d

    Sep 23, 2019 10:57

    2019.3.0b4 fixed the issue for me as well. 2019.1.14f1 works fine too.

  10. CJ-HOLOLUX

    Sep 23, 2019 10:01

    Issue also included in 2018.4.8f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.