| | |
| | | void OnGUI() |
| | | { |
| | | GUILayout.Label("字体"); |
| | | fromFont = (Font)EditorGUILayout.ObjectField(fromFont, typeof(Font), true, GUILayout.MinWidth(100f)); |
| | | fromChangeFont = fromFont; |
| | | if (GUILayout.Button("更换字体大小")) |
| | | { |
| | | Change(); |
| | |
| | | Text[] transArr14 = _prefab.GetComponentsInChildren<Text>(true); |
| | | a += transArr14.Length; |
| | | |
| | | bool change = false; |
| | | foreach (Text item in transArr14) |
| | | { |
| | | bool change = false; |
| | | if (item.text == "0")
|
| | | if (item.fontSize == 22 && item.resizeTextForBestFit ==false && item.rectTransform.rect.height == 30)
|
| | | {
|
| | | item.text = ""; |
| | | item.fontSize = 21; |
| | | change = true; |
| | | } |
| | |
|
| | | if (change)
|
| | | { |
| | | EditorUtility.SetDirty(_prefab); |
| | | Debug.LogFormat("界面 {0} 字体大小修改成功", file); |
| | | i++; |
| | | }
|
| | | |
| | | }
|
| | | if (change)
|
| | | {
|
| | | EditorUtility.SetDirty(_prefab);
|
| | | Debug.LogFormat("界面 {0} 字体大小修改成功", file);
|
| | | i++;
|
| | | } |
| | | |
| | | startIndex++; |