| | |
| | | { |
| | | Change(); |
| | | } |
| | | if (GUILayout.Button("检测字体和rect的高度")) |
| | | if (GUILayout.Button("检测字体和自适应的关系")) |
| | | { |
| | | FindSmallRect(); |
| | | } |
| | |
| | | |
| | | foreach (Text item in transArr14) |
| | | { |
| | | if (item.rectTransform.sizeDelta.y - item.fontSize <= 3) |
| | | { |
| | | Debug.LogFormat("界面 {0} 字体检测太小 {1}, {2}", file, item.rectTransform.sizeDelta.y, item.fontSize); |
| | | if (item.verticalOverflow == VerticalWrapMode.Overflow || item.horizontalOverflow == HorizontalWrapMode.Overflow) |
| | | { |
| | | var target = item.GetComponent<ContentSizeFitter>(); |
| | | if (target != null) |
| | | { |
| | | Debug.LogErrorFormat("存在overflwer和ContentSizeFitter 冲突的预制体 {0} - {1}", file, item.name); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | if (isCancel || startIndex >= filepaths.Length) |
| | | { |
| | | Debug.LogFormat("检测字体和rect的高度--检索{0}个预制体, 字体总个数{1}", startIndex, a); |
| | | Debug.LogFormat("检测字体和自适应的关系--检索{0}个预制体, 字体总个数{1}", startIndex, a); |
| | | EditorUtility.ClearProgressBar(); |
| | | EditorApplication.update = null; |
| | | startIndex = 0; |