We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
大佬你好,我现在在用这份插件制作无限循环列表,发现:
The text was updated successfully, but these errors were encountered:
没有输入Index获取item的接口,也没有找到itemList这样的结构,请问如何定义这个接口?
这里我其实是建议提供数据的时候在外部逻辑里缓存一份,也就是在实现GameObject GetObject(int index)接口的地方留一份缓存即可。如果说希望在内部提供,大致这么写
GameObject GetObject(int index)
public Transform GetItemByIndex(int index) { return m_Content.GetChild(index - itemTypeStart); }
我现在要做点击Item后让它移动到ViewPort中间位置,尝试修改ScrollToCell无果,请问该怎么修改可以达到目的?
比较接近的是ScrollToCell接口,用于将某个item滑动到头部/尾部;所以需要根据每个item的大小以及整个容器大小来换算一下(目测还要补一个offset)
ScrollToCell
我现在要实现滑动列表时,自动将ViewPort中间Item长宽范围高亮,脱离这个中间范围就取消高亮,达到类似手机上滚动时钟或者老虎机那样的效果,请问我该怎么检测item是否达到了ViewPort中间范围,或者有没有更佳的建议可以提供呢?
可以考虑监听scrollbar的onValueChanged,在触发拖动的时候检查一下
Sorry, something went wrong.
我们也遇到类似的问题,Item它移动到ViewPort中间位置的需求非常普遍
手头项目上线压力非常大,抱歉最近一段时间实在抽不出手来处理。如果方便的话可以来个pull request?
No branches or pull requests
大佬你好,我现在在用这份插件制作无限循环列表,发现:
The text was updated successfully, but these errors were encountered: