Search Issue Tracker

By Design

Votes

0

Found in

2017.4

2018.4

2019.2

2019.2.14f1

2019.3

2020.1

Issue ID

1202976

Regression

No

Button onClick list is not modified if the Target method's accessibility is set to private

uGUI

-

How to reproduce:
1. Open the "SampleScene" scene in the attached "PrivateButtonRepro.zip" project
2. Select "Button" GameObject in the Scene
3. Observe that the "Button" component has Test.OnButtonClick method selected in "OnClick()" tab even though it is private

Expected Behaviour: Either Test.OnButtonClick method is deselected or Test.OnButtonClick method is shown in the dropdown
Actual Behaviour: Test.OnButtonClick method is selected but it is not shown in the method dropdown

Reproducible with: 2017.4.35f1, 2018.4.14f1, 2019.2.16f1, 2019.3.0f3, 2020.1.0a16

Note: This case has an old duplicate case marked as by design 908172

  1. Resolution Note (2020.1.X):

    This is by design we dont re serialize the list when recompiling so the old reference a function pointer is maintained. We dont find private methods by design if one is assigned we dont clear it nor do we know its switched without a lot of over head.

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.