Search Issue Tracker
By Design
Votes
1
Found in
2017.4
2019.3.5f1
2020.2
Issue ID
1239517
Regression
No
Scroll Rect scrolls indefinitely if the Canvas it is attached to is disabled when entering Play mode
How to reproduce:
1. Open the attached "1239517 repro" project
2. Open the "TestScene" from the Assets folder
3. Select the "Image" GameObject
4. Enter Play mode
Expected result: the Rect Transform values of the "Image" GameObject don't change
Actual result: the Rect Transform values of the "Image" GameObject change steadily
Reproducible with: 2017.4.40f1, 2018.4.22f1, 2019.3.11f1, 2020.1.0b8, 2020.2.0a8
Notes:
-The GameObject holding the Scroll Rect needs to have a parent GameObject between itself and the GameObject holding the Canvas Component
-This bug doesn't reproduce if the Canvas is enabled when entering Play mode and gets disabled while playing
-The speed at which values change is directly correlated to the Rect Transform Y Scale of the GameObject holding the Scroll Rect Component. The closer it is to 0 the faster the values change. If the value of the Y Scale is 0, the bug doesn't reproduce
-When the Canvas gets enabled the values rapidly return to the correct ones as shown in "ScrollBug.mp4"
-If the values become big enough they won't return to the correct ones even when the Canvas is enabled as shown in "ProlongedTest.mp4"
-Sometimes the values change even when not in play mode as shown in "NotInPlayMode.mp4" but this happened only a few times and the reproduction steps for that remain unknown
-The Canvas Scaler seems to be a workaround and not a cause of this bug since it is reproducible without it
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
- Physics SyncColliders 3x-7x performance regression from 2022LTS to U6
- ListView's '+' button causes a recursively dispatching event when the visual element area is filled up
- Soft keyboard closes immediately after multiple touches are made if Pointer Behavior is set to SingleUnifiedPointer
- UI Image batching breaks when interleaving elements with mixed z-positions and materials
- KeyNotFoundException is thrown when retrieving some values from HyperLinkClickedEventArgs
Resolution Note (2020.2.X):
The Viewport property must be set in order to make the Scroll Rect work properly