Search Issue Tracker
Duplicate
Votes
1
Found in
2019.3
2019.3.2f1
2020.2
Issue ID
1228350
Regression
No
UI Components (Slider, Scrollbar, Toggle) Event 'OnValueChanged' isn't getting called when Domain Reloading is disabled
How to reproduce:
1. Open the attached project (SliderOnValueChangedBug.zip)
2. Open the OnValueChangedBug Scene
3. Make sure that Reload Domain setting is disabled (Edit -> Project Settings -> Editor -> Enter Play Mode Settings)
4. Enter the Play mode
Expected result: The OnValueChanged Event gets triggered and DemoSliderBug.cs function gets called printing "On Slider Change" on every frame in the Console Window
Actual result: The OnValueChanged Event is not getting triggered and nothing gets printed In the Console Window
Reproducible with: 2019.3.5f1, 2020.1.0b1, 2020.2.0a3
Could not test with: 2017.4.38f1, 2018.4.19f1 (Enter Play Mode Settings not implemented yet)
Notes:
1. If the OnValueChanged event is manually written in a Script as a delegate, it is working as expected. This means, that the issue occurs only when the event is chosen in the Inspector window of the Slider/ Scrollbar/ Toggle Component
2. Scroll View and Input Field events 'On Value Changed' are working as expected
3. When you then change the Slider value through the Inspector Window, the Console message gets printed with the expected behavior
4. When OnValueChanged event is set to work on 'Editor and Runtime' instead of just 'Runtime', it also works as expected
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
- [Android] Stage information is not logged when Log Shader Compilation is enabled
- [Vulkan] The memory allocation increases rapidly when there are multiple (three or more) Real-Time Reflection Probes in the Scene
- [macOS] Library folder of the opened project can be deleted which leads to the crash
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
This is a duplicate of issue #1206410