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

uGUI

-

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

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.