| | |
| | | }
|
| | |
|
| | |
|
| | | //BaseCanvas/MainInterfaceWin/Widget_RightBottom/Container_Function/Function_Grid/Grid_6/Content/Btn_@*
|
| | | //分割成BaseCanvas/MainInterfaceWin/Widget_RightBottom/Container_Function/Function_Grid/Grid_6/Content 和 Btn_
|
| | | //在WindowCenter.Instance.uiRoot的 BaseCanvas/MainInterfaceWin/Widget_RightBottom/Container_Function/Function_Grid/Grid_6/Content下查找以Btn_开头的第一个子物体
|
| | |
|
| | | //支持路径末尾加@*做模糊查找
|
| | | private Transform FindTransform(string path)
|
| | | {
|
| | | if (!path.EndsWith("@*"))
|
| | | {
|
| | | return WindowCenter.Instance.uiRoot.transform.Find(path);
|
| | | }
|
| | |
|
| | | var paths = path.Split('/');
|
| | | var newPath = string.Join("/", paths, 0, paths.Length - 1);
|
| | | string findName = paths[paths.Length - 1].Replace("@*", "");
|
| | | var parent = WindowCenter.Instance.uiRoot.transform.Find(newPath);
|
| | | if (parent == null)
|
| | | {
|
| | | return null;
|
| | | }
|
| | | var comps = parent.GetComponentsInChildren<Transform>();
|
| | | for (int i = 0; i < comps.Length; i++)
|
| | | {
|
| | | if (comps[i].name.StartsWith(findName))
|
| | | {
|
| | | return comps[i];
|
| | | }
|
| | | }
|
| | |
|
| | | return WindowCenter.Instance.uiRoot.transform.Find(path);
|
| | | }
|
| | |
|
| | | private void FindAndAttachTrigger(NewBieGuideScriptableObject _stepConfig)
|
| | | {
|
| | | m_ClickTarget = WindowCenter.Instance.uiRoot.transform.Find(_stepConfig.UIElementPath);
|
| | | m_ClickTarget = FindTransform(_stepConfig.UIElementPath);
|
| | |
|
| | | m_ClickEmptyComplete.RemoveAllListeners();
|
| | | if (_stepConfig.clickAnyWhereComplete)
|