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
- “Readme” Asset is unreadable in the Inspector window when switching Editor Theme to Light
- “NullReferenceException” error thrown when switching Editor Theme to Light if “Unity Version Control” tab is enabled
- A Warning is displayed in the Inspector when a Mesh with any Material is added as a Terrain Detail
- [Android][Vulkan] Memory leak when playing and stopping a video using the Video Player on some devices
- Caret moves by a character when typing "." and any number into 'Grid and Snap' toolbar's input field
This is a duplicate of issue #1206410