com.unity.uiextensions icon indicating copy to clipboard operation
com.unity.uiextensions copied to clipboard

Accordion inside scroll-rect

Open SimonDarksideJ opened this issue 3 years ago • 0 comments

Issue created by zitu as Bitbucket Issue #​53 on 2016.01.26 16:39. Hi, Im trying to use a couple of features of the project together but I have a little problem.

I want to put an accordion inside a scrollrect so i can put a lot of items and scroll vertically through em and expand the one I want.

I've managed to make the accordion work, as in the demo video creating the hierarchy:


Scroll-panel
l---> Accordion Group
l--------> Accordion Element 1
l-----------------> header 1
l-----------------> body 1

l--------> Accordion Element 2
l-----------------> header 2
l-----------------> body 2

...

And attached to the "Scroll-panel" the scrollrect and the mask components, to make it a usual scrollrect. As content for this, I've dragged the "Accordion Group".

In the scene window, the mask component of the Scroll-panel makes its function and masks the elements inside it. But when I play the scene, the content gets out of the scroll-panel. It scrolls and behaves as a normal scrollrect.

As the scene is playing, if I disable the mask component and re-enable it, then the masking works.

Itis not a big deal, and through code i can disable/enable the mask at runtime just before showing the accordion, but as it is a strange behaviour, I would like to ask if someone knows a method to make it work without extra code.

Thanks, and sorry if this is not the correct place to ask this.

SimonDarksideJ avatar Apr 25 '22 10:04 SimonDarksideJ