uis icon indicating copy to clipboard operation
uis copied to clipboard

Why there's an InitData call in UpdateVertical method ?

Open wangyongcong opened this issue 1 year ago • 0 comments

I'm adding "snap to item" feature to scroller. While reading the code, I encountered some issues and would like to ask for your help.

In the UpdateVertical and UpdateHorizontal method, there's a condition check which could trigger a call to InitData

https://github.com/mopsicus/uis/blob/4e608e3e8e5f85bf05f6c805e58e39a70c85db3e/Runtime/Scroller.cs#L463

I can't figure out what's the purpose of this if condition. I'd appreciate it if you could explain it to me. Thank you.

wangyongcong avatar Oct 20 '24 04:10 wangyongcong