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

ScrollingObjectCollection.ManageVisibility takes too long when numerous objects in container #11832

Open
julienlang opened this issue Sep 6, 2024 · 0 comments
Labels

Comments

@julienlang
Copy link

Describe the bug

Using the MRTK2 ScrollingObjectCollection, when the list of objects in the container is more than just a few (like in the example scenes) the ManageVisibility method, which is called every frame, takes too long and significantly impacts performance: from 60fps to 20fps!

To reproduce

Following instructions in page linked above, create a ScrollingObjectCollection. Add many buttons to its GridObjectCollection. Update the collection.
Using the Unity profiler, you can notice that the Camera pre-render or the LateUpdate (depending on the UseOnPreRender option) takes a lot of time.

Expected behavior

ManageVisibility is not called when the collection hasn't been scrolled.
This is the workaround I have implemented.

@julienlang julienlang added the Bug label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant