using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; /* 教程界面(主界面功能) */ public class CourseView : JCUnityLib.ViewBase, MenuBackInterface { [SerializeField] GameObject scrollViewContent; [SerializeField] GameObject scrollViewContentItem; string[] videoUrls = { "新手教程-无连接" }; public void Awake() { scrollViewContentItem.transform.Find("Icon").gameObject.SetActive(false); scrollViewContentItem.transform.Find("Icon-1").gameObject.SetActive(false); scrollViewContentItem.SetActive(false); for (int i = 1; i <= videoUrls.Length; i++) { int id = i; string title = TextAutoLanguage2.GetTextByKey("course_title_" + (id - 1)); GameObject item = Instantiate(scrollViewContentItem, scrollViewContent.transform); item.GetComponent().text = id + "、" + title; Transform icon = item.transform.Find(id == 1 ? "Icon-1" : "Icon"); icon.GetComponent