Search Issue Tracker

Fixed in 2020.1

Fixed in 2018.4, 2019.2, 2019.3

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. Fdd8c3da593707cdf752050c52342403?d=mm

    madTeddy

    Oct 07, 2019 14:46

    Yep, same problem in 2018.4.10f1

  2. E1d5009c5868810cb6f2de0fa9d846cb?d=mm

    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. B6d432a25d4935b54b25d121e16af005?d=mm

    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. 4956de76d1a1adb9a25a22f03dc59854?d=mm

    MichaelHeiml82

    Oct 04, 2019 09:40

    Also happens in 2018.4.10f1

  5. Af4dbd09f37426e4f75088010e2a9e89?d=mm

    pnelsonic

    Oct 03, 2019 20:25

    Also occurs in 2018.4.9f1

  6. 947c8309c6e842a5b86c63a297b933cd?d=mm

    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. 50849d4f1b3c3cd511e5a060c85720ce?d=mm

    Colin_MacLeod

    Oct 01, 2019 16:10

    Occurs in 2019.2.7f1

  8. 7cda9714ec9f33b97a795ef10861cb3b?d=mm

    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. 939fb8a3f98cf11ff64c5686f3f8b264?d=mm

    mirage3d

    Sep 23, 2019 10:57

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

  10. 85ccd1c047b7ce792464114bda872d02?d=mm

    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.