Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble with Infinite Scroll Rect #395

Open
SimonDarksideJ opened this issue Apr 26, 2022 · 4 comments
Open

Trouble with Infinite Scroll Rect #395

SimonDarksideJ opened this issue Apr 26, 2022 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@SimonDarksideJ
Copy link
Contributor

Issue created by Dylan Daniels as Bitbucket Issue #​395 on 2022.01.14 03:52.
Hey! First of all I want to say great job with this project. I have downloaded and am using the infinite scroll rect script on a gridlayout group. It does work, but I want the first objects in the layout group to move to the back when they are off screen and vice versa. The problem is changing any of the values makes them flicker, and still not have the desired effect. I know it’s nothing major, but I would really appreicate any advice you guys could give me to achieve what I want :slight_smile:

@SimonDarksideJ
Copy link
Contributor Author

On 2022.01.14 04:01, Dylan Daniels commented:

I basically need the things on the right hand side of the screen to be directly behind the ones on the left, and I need them to split much earlier so it is a constant scroll of objects and with no space between.

@SimonDarksideJ
Copy link
Contributor Author

On 2022.01.17 11:54, @SimonDarksideJ commented:
Interesting use, I personally haven’t tried the infinite scroll with the Grid layout, but will see if there is anything that can be done to improve it’s use.

Can you provide an example scene just using the UI Extension and Unity controls to test out your combination on please?

@SimonDarksideJ
Copy link
Contributor Author

On 2022.01.17 21:26 Dylan Daniels modified issue:
attachment changed /UnityUIExtensions/unity-ui-extensions/issues/attachments/395/UnityUIExtensions/unity-ui-extensions/1642454803.91/395/IniniteScrollRectTestExport.unitypackageIniniteScrollRectTestExport.unitypackage

@SimonDarksideJ
Copy link
Contributor Author

On 2022.01.17 21:26, Dylan Daniels commented:
Hey @{557058:da9b1be2-6172-44a5-a085-cae5d30eda9e} ! Yeah of course. I quickly threw this scene together before work, for what ever reason I couldn't get the standard scroll rect working, but I'm sure it's something trivial.

As for what modifications I've done, I'm checking the constraintCount on the gridlayout group and when deciding anchored position I am doing this:

c\# _newAnchoredPosition.x -= _itemCount * _recordOffsetX / _gridColumns;

which seems to work, but only if the contents of the gridlayout are an even size. (any gaps in the grid seem to mess it up.) The other task is preventing the contents from leaving the screen. (preventing any sort of scrolling.) I have tried simply moving it back once it’s released but then it messes up the “infinite” illusion of the scroll rect.

EDIT: I’ve had a look at it after work and it seems to only work correctly if the number of items is perfectly divisable by the gridcolumns.

@SimonDarksideJ SimonDarksideJ added bug Something isn't working help wanted Extra attention is needed labels Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant