Recyclable-Scroll-Rect
Recyclable-Scroll-Rect copied to clipboard
Manually initialized horizontal scroll not working
Hi there, first of all thanks for making this, seems like just what I need.
However, when I was getting it set up I ran into this issue that you can replicate in the Horizontal demo scene:
- Turn off Self Initialize in the Recyclable Scroll Rect
- Modify the Demo script awake function so it does the initialize with the datasource:
private void Awake()
{
InitData();
_recyclableScrollRect.Initialize(this);
}
- See that now the area wants to scroll vertically instead of horizontally.
https://user-images.githubusercontent.com/3324901/128116405-075aab35-2cc5-4603-b208-2206af63a873.mov
I haven't been able to figure out what's causing this yet but I'll update this if I find out any more.
Bug occurred in RecyclableScrollRect.cs Start Function
protected override void Start()
{
// remove
vertical = true;
horizontal = false;
///
if (!Application.isPlaying) return;
if (SelfInitialize) Initialize();
}
Remove vertical = true;, horizontal = false;
Hello I can confirm this bug and the provided fix by @KimYeonmu