-
Notifications
You must be signed in to change notification settings - Fork 2
/
DemoCell.cs
33 lines (30 loc) · 980 Bytes
/
DemoCell.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//
// Copyright (C) 2021 LimeVista
// Author: LimeVista(https://github.com/LimeVista/RecyclableScrollRectX)
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the The MIT License (MIT).
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See The MIT License (MIT) for more details.
//
// You should have received a copy of The MIT License (MIT)
// along with this library.
//
using UnityEngine;
using UnityEngine.UI;
namespace RecyclableScrollRectX.Samples
{
public class DemoCell : MonoBehaviour, RecyclingSystem.ICell
{
[SerializeField] private Text title;
[SerializeField] private Text subTitle;
public void OnBind(int index)
{
title.text = $"Title-{index:000}";
subTitle.text = $"{index:000}";
}
}
}