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
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
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [URP] Crash on GameObject::QueryComponentByType when baking a Reflection Probe in an unsaved/untitled Scene
- No Icons are used for the Entry and Exit States in the Inspector when selected in an Animator Controller
- Crash on PlayerMain(int, char const**) when exiting Standalone Player with a Particle System in the Scene
- No Icon is used for the Runtime Animator Controller Type in a Search Window when assigning an Animator Controller in the Animator Component
- Unity Version Control server textfield’s text overlaps with the dropdown triangle button in the Explore repositories window when an organization with a long name is selected
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.