Scrolling Object scrolls and then springs back to original position

Paul Klahr 1 Reputation point
2021-06-17T19:09:14+00:00

This is for MRTK in Unity for us on Hololens 2.

I imported the Scrolling Object prefab. The buttons are populated dynamically at run time.
I can scroll the list in the Unity Editor (with difficulty), however, when I release the mouse the list reverts backwards. How can I remedy this problem.

HoloLens Development
HoloLens Development
HoloLens: A family of Microsoft self-contained, holographic devices that enable engagement with digital content and interaction with holograms in the surrounding environment.Development: The process of researching, productizing, and refining new or existing technologies.
406 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sarah Zhang 76 Reputation points
    2021-06-29T09:12:42.2+00:00

    Hello, Welcome to Microsoft Q&A,

    Thanks for the reply. Firstly, for the clarification, the component – Scrolling Object Collection provides a feature for the scroll objects to prevent the scrolling content from being dragged out of the clipping bound. When the scroll container is scrolled to the end, and it can't fill the scrolling viewable area, the scrolling container would bounce back to fill the scrolling viewable area after you release the mouse. It’s by design. If you want to disable this feature, you can navigate to the component [Scrolling Object Collection], uncheck the option [Disable Clipped Game Objects].
    If the issue you mentioned happened in every dragging. You may need to check the settings of the [ScrollingObjectColllection]->[Page Cell]. As this section – [Configuring the scrolling viewable area] (https://learn.microsoft.com/en-us/windows/mixed-reality/mrtk-unity/features/ux-building-blocks/scrolling-object-collection?view=mrtkunity-2021-05#configuring-the-scrolling-viewable-area) said, the width, height, depth should be changed to the dimensions of the content items, for this situation, it should be the dimension of the button. Otherwise, it may cause the offset of the scrolling.

    ----
    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Meghana, GT 0 Reputation points
    2025-01-17T10:56:21.69+00:00

    Hi,

    Im facing one issue with scrollingobjectcollection, when the gameobjects are added dynamically to the gridobject collection present in scrollingobject collection, the game objects contains textmeshpro text and inputfields, when the screen is rotated or titled bit tilted then the unity elements can be seen outside of the visible area even though the mask is enabled, but mrtk buttons are masked. as shown in below figure.

    User's image

    Workaround or solution for this is issue is helpful.

    Thanks

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.