using System.Collections.Generic; using System.IO; using System.Linq; using Newtonsoft.Json; using Runtime; using UnityEngine.UI; using TMPro; using UnityEngine; using UnityEngine.Serialization; using ZGame; namespace HK.FUJIFILM { [System.Serializable] public class ProductData { public List listProduct = new List(); } [System.Serializable] public class ProductItemData { public string productID; public string productName; public bool isCanGoNext; } public class ProductUI : UIBase { [SerializeField] private UpMenuItem goUpMenu; [SerializeField] private ScrollRect scrParent; [SerializeField] private List listProduct = new List(); public override void OnInit() { base.OnInit(); #region AutoGen_Init goUpMenu = GetValue("goUpMenu"); scrParent = GetValue("scrParent"); #endregion // var readAllLines = File.ReadAllLines(Path.Combine(Application.streamingAssetsPath,"testScrollRect.txt")); // scrParent.elasticity = float.Parse(readAllLines[2]); // scrParent.decelerationRate = float.Parse(readAllLines[1]); // scrParent.scrollSensitivity = float.Parse(readAllLines[0]); foreach (var productScriptableObject in listProduct) { var go = ResourcesManager.Instance.LoadGameObject( AssetConst.Assets_Res_FUJIFILM_Prefabs_UI_Item_btnIProducttem_prefab, scrParent.content); go.SetActive(true); var image = go.GetComponent(); image.sprite = productScriptableObject.icon; var button = go.GetComponent