Recyclable-Scroll-Rect icon indicating copy to clipboard operation
Recyclable-Scroll-Rect copied to clipboard

Manually initialized horizontal scroll not working

Open dshook opened this issue 4 years ago • 2 comments

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:

  1. Turn off Self Initialize in the Recyclable Scroll Rect
  2. Modify the Demo script awake function so it does the initialize with the datasource:
    private void Awake()
    {
        InitData();
        _recyclableScrollRect.Initialize(this);
    }
  1. 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.

dshook avatar Aug 04 '21 03:08 dshook

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;

KimYeonmu avatar Aug 24 '21 04:08 KimYeonmu

Hello I can confirm this bug and the provided fix by @KimYeonmu

SuperKLA avatar Dec 14 '21 09:12 SuperKLA