|
Post by nightmarexgr on Aug 30, 2023 0:39:31 GMT
Hello im using Enhanced Scroller for my project and at some point i have cell views that are dropdowns. It works normally until i open the dropdown and it overlaps with the below cell and instead of drawing above it, it draws below it. This is expected behaviour from unity since it takes into account the order of the inspector gameobjects. I must not move/resize my cells for my current project, also the chat demo is not suitable for my case since it draws normally but from the bottom up. What i need is my elements to draw in reversed order in the inspector. I have made this work for my non-enhanced scroller layout but i am unable to modify your code without help.
In short i need the cells to draw in reverse order.
|
|
|
Post by echo17 on Aug 30, 2023 9:31:03 GMT
Hmmm, I can't seem to reproduce this issue. If I add a dropdown to Demo #1, it correctly displays on top of the other cells. Here is a screenshot of the dropdown activated in cell 3: Since I can't duplicate, it's hard for me to test this, but here is a link that might help: linkIf you want to send me an example simplified project that demonstrates the issue, I can take a look. Please see this FAQ: link
|
|
|
Post by nightmarexgr on Aug 30, 2023 13:07:53 GMT
Ah you are right with unity's dropdowns this works just fine, sorry for the confusion i was trying to simplify the process since i am using a custom solution for the UI on my end. Basically the way to reproduce my issue is to add an image to the cellview of the demo 1 and offset it like my values in the inspector (image 1). Then it will look like this (image 2) But what i want is the top cells to render above their below ones (image 3 blue arrows shouldn't be visible with inverse order) PS. I worked about 20 hours on that and so far i inverted the vertical layout group order, this seemed to be the trick but it breaks enhanced scroller sorting algorithm, i tried fixxing that by modifying the returned indexes of _CalculateCurrentActiveCellRange by subtracting them from their max value and seems to barely work but im not sure what else might break, i need some help
|
|
|
Post by echo17 on Aug 31, 2023 9:06:51 GMT
Thanks for the clarification. I was able to reproduce with an image overlapping the cell's boundaries. EnhancedScroller uses a LayoutGroup to display the cells in the scroller. The layout group requires that the order of elements dictate the positioning. Unfortunately, Unity also requires that the order of elements dictate the draw order. Very bad design on Unity's part. So what you are describing is known as a z-index setting, which almost every graphics engine supports, except Unity apparently. According to this thread ( link) z-indexing is now on the Unity roadmap for the next release cycle. Scroll down to the bottom to see this announcement. I have also verified that it is on the roadmap by visiting the UI roadmap here: link. If you scroll down, you will see "Depth Ordering". You can click on it and submit that you find this lacking feature to be critical, and give an explanation. I did as well: Hopefully, with enough pressure, Unity will implement this much needed feature that would solve this issue you are experiencing.
|
|