using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; /* 教程界面(主界面功能) */ public class CourseView : JCUnityLib.ViewBase, MenuBackInterface { [SerializeField] GameObject scrollViewContent; [SerializeField] GameObject scrollViewContentItem; int[] titleIds = {0, 12}; Dictionary videoUrlDict = new Dictionary(); public void Awake() { videoUrlDict[12] = "https://smartbow-1310052819.cos.ap-shanghai.myqcloud.com/Video/%E4%B8%AD%E6%96%87%E5%8E%8B%E7%BC%A9.mp4"; scrollViewContentItem.transform.Find("Icon").gameObject.SetActive(false); scrollViewContentItem.transform.Find("Icon-1").gameObject.SetActive(false); scrollViewContentItem.SetActive(false); int titleSeq = 1; foreach (var titleId in titleIds) { string title = TextAutoLanguage2.GetTextByKey("course_title_" + titleId); GameObject item = Instantiate(scrollViewContentItem, scrollViewContent.transform); item.GetComponent().text = titleSeq + "、" + title; titleSeq++; bool useIcon1 = titleId == 0 || titleId == 12; Transform icon = item.transform.Find(useIcon1 ? "Icon-1" : "Icon"); icon.GetComponent