UnityDynamicScrollView icon indicating copy to clipboard operation
UnityDynamicScrollView copied to clipboard

你好可以增加功能吗? 内容从下往上,例如盖楼,从底部开始往上面盖的

Open tpnet opened this issue 6 years ago • 2 comments

你好可以增加功能吗? 内容从下往上,例如盖楼,从底部开始往上面盖的,超出屏幕了,就可以下滑显示高的楼层。

tpnet avatar Nov 09 '19 09:11 tpnet

hello, i love this scrollview!! and i want this function too. :)

hyunamy avatar Jul 25 '24 08:07 hyunamy

hello, i love this scrollview!! and i want this function too. :)

Thank you for your support.

The requirement you mentioned is indeed very common. However, I apologize as I am currently quite busy and will consider addressing this in the future when I have more time.

In fact, how to display the corresponding Item based on an index is determined by the update function:

void SetUpdateFunc(Action<int, RectTransform> func)

You can achieve this by modifying the passed function to swap the order of the indices. For example:

SetUpdateFunc((idx, rect) => {
    // idx = totalItemCount - 1 - idx;
    // var dataForIndex = dataSource[idx];
    // rect.UpdateView()
});

Please note that if you are using other delegate functions involving the index, such as SetItemSizeFunc and SetItemGetAndRecycleFunc, you will need to modify them accordingly as well.

I hope this can help.

aillieo avatar Jul 26 '24 12:07 aillieo