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 (23)

  1. Fd88cb3bcc4abdec0bf61d06399bb05c?d=mm

    oybek2891

    Dec 09, 2019 19:23

    Still not fixed in 2019.2.13f and 2019.3.0f1

  2. Dc6f95b6a70760449e6b17785b5b88ce?d=mm

    NeilWishart

    Nov 18, 2019 10:12

    The new issue was marked as a duplicate, anybody looking for info on the new fix will need to check here instead: https://issuetracker.unity3d.com/issues/upgrading-the-project-results-in-missing-system-dot-serializable-unityevent-function

  3. 111df7ad7fd2aa0f9b20177897cf89af?d=mm

    luis_oliveiras

    Oct 24, 2019 00:42

    the link to the new issue is broken, could you post it again?

  4. 4cd7d44f8da08e4f10462b30de15fccb?d=mm

    Domas_L

    Oct 22, 2019 17:48

    Hello! It seems that the issue was only partially fixed, and in some cases, in particular when the class is derived from another class, the issue can still be reproduced. This issue is now being tracked, and you can follow its progress here: https://issuetracker.unity3d.com/is...-when-the-class-is-derived-from-another-class

  5. B3a079327cfa4f85367ccdee4731a078?d=mm

    mnarimani

    Oct 18, 2019 12:07

    Issue still exists in 2019.2.9

  6. Fb2caa50e82513b242a0f007a9c29926?d=mm

    eprovencher

    Oct 15, 2019 16:56

    It seems that there are 2 bugs here. The private field bug may have been fixed, but dynamic method parameters from events are still not fixed.
    https://forum.unity.com/threads/2018-4-9f1-doesnt-show-dynamic-methods-for-events.758357/

  7. Fb2caa50e82513b242a0f007a9c29926?d=mm

    eprovencher

    Oct 15, 2019 14:21

    Just downloaded 2018.4.11, and the issue is still present with UnityEvents trying to pass dynamic parameters via public functions.

  8. E1d5009c5868810cb6f2de0fa9d846cb?d=mm

    Elringus

    Oct 13, 2019 17:18

    Still not fixed in 2019.2.9f1.

  9. Fdd8c3da593707cdf752050c52342403?d=mm

    madTeddy

    Oct 07, 2019 14:46

    Yep, same problem in 2018.4.10f1

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.