public override void InitFind() { base.InitFind(); MenuButtonStartPos = FindTool.FindChildComponent <Transform>(transform.parent, "MenuButtonStartPos"); Group_Button = FindTool.FindChildComponent <CanvasGroup>(transform, "Group_Button"); baseButtons = Group_Button.GetComponentsInChildren <MenuButton>(); Tips = FindTool.FindChildComponent <CanvasGroup>(transform.parent, "Tips"); contentPanel = FindTool.FindChildComponent <ContentPanel>(transform.parent, "ContentPanel"); gameContentPanel = FindTool.FindChildComponent <GameContentPanel>(transform.parent, "GameContentPanel"); contentPanel.Init(this); gameContentPanel.Init(this); Tips.DOFillAlpha(0, 0.5f); for (int i = 0; i < MainData.Instance.directoryPathDatas.Count; i++) { string str = MainData.Instance.directoryPathDatas[i].directoryInfo.Name; //如果提示这里索引超出范围,就将预设里六个按钮,被关掉的两个按钮的勾打上 baseButtons[i].Init(str); } }