using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; public class DuelRankRewardItem : MonoBehaviour { public GameObject bar_root; public Image bar; public GameObject bg_normal; public GameObject bg_gray; public GameObject bg_next; public List rewardItems; public TMP_Text text_rank; public Image icon_rank; public TMP_Text text_point; private void Reset() { bar_root = transform.Find("bg_bar").gameObject; bar = transform.Find("bg_bar/bar").GetComponent(); bg_normal = transform.Find("bg_normal").gameObject; bg_gray = transform.Find("bg_gray").gameObject; bg_next = transform.Find("bg_next").gameObject; text_rank = transform.Find("rank/text_rank").GetComponent(); icon_rank = transform.Find("rank/icon_rank").GetComponent(); text_point = transform.Find("rank/text_point").GetComponent(); rewardItems = new List(); for (int i = 1; i < 5; i++) { rewardItems.Add(transform.Find($"reward/reward{i}").GetComponent()); } } }