microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

How to handle "a lot" of objects in a scrolling collection? #8817

Closed dtb49 closed 9 months ago

dtb49 commented 3 years ago

Overview

So I recently upgraded to the 2.5 release so that I could use the new scrolling object. I created a rather large list of items consisting of about maybe 50-60 text buttons from the mrtk and it seemed to really kill the app performance.

There's really nothing special about the buttons other than just a simple label on them. Even if I configure it to only show like 4 buttons at a time it still doesn't really help the performance of it at all. I kind of expected that if the buttons were disabled it would help with the performance but, this doesn't seem to be the case.

Is there a a way to optimize this? Or should I try to create some other controller to limit the number of items in the scroll view at a time?

Any help or advice would be greatly appreciated!

Unity Version

2019.15

vaoliva commented 3 years ago

Hi @dtb49 What MRTK button prefab are you using?

dtb49 commented 3 years ago

@vaoliva it looks like it is the Button prefab found under MRTK/SDK/Features/UX/Interactable/Prefabs

vaoliva commented 3 years ago

@dtb49 I was trying to reproduce the issue, by adding 100 x "PressableButtonHololens2_NoLabel" prefabs which contains 5 renderer children each. All of them using the correct material for clipping. But I couldn't replicate a perf hit like you describe. Could you try to use those instead of the regular Pressable Buttons? Also bear in mind, sprite dafault material are not well supported with the Scroll.

stale[bot] commented 2 years ago

This issue has been marked as stale by an automated process because it has not had any recent activity. It will be automatically closed in 30 days if no further activity occurs. If this is still an issue please add a new comment with more recent details and repro steps.

IssueSyncBot commented 9 months ago

We appreciate your feedback and thank you for reporting this issue.

Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.

Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.

Please note that MRTK3 was released in August 2023. It features an all-new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visit https://www.mixedrealitytoolkit.org.

Thank you for your continued support of the Mixed Reality Toolkit!