Skip to content
New issue

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

infinity scroll 관련 질문입니다. #218

Closed
alstkd3477 opened this issue May 31, 2022 · 0 comments
Closed

infinity scroll 관련 질문입니다. #218

alstkd3477 opened this issue May 31, 2022 · 0 comments
Labels
question Issue type : Question

Comments

@alstkd3477
Copy link

public class testItemData : InfiniteScrollData
{
	public int index = 0;
	public Sprite img;
}
public class test : InfiniteScrollItem
{
	public Text text;
	public override void UpdateData(InfiniteScrollData scrollData)
	{
		base.UpdateData(scrollData);
		testItemData itemData = (testItemData)scrollData;
		text.text = `itemData.index.ToString();`
	}
}

위는 아이템 구조체이며,

testItemData data = new testItemData();
for (int i = 0; i < limit; i++)
{
	data.index = i;
	verticalScrollList.InsertData(data);
}

위와 같이 데이타를 넣으면
스크롤뷰에서 스크롤 후 맨마지막 데이터로 전체가 바뀝니다.
따로 설정을 빠트린 부분이 있을까요?
캡처

@alstkd3477 alstkd3477 added the question Issue type : Question label May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Issue type : Question
Projects
None yet
Development

No branches or pull requests

1 participant