using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine.UI;
public class ChangeFontWindow : EditorWindow {
[MenuItem("Tools/UI/Change Font")]
private static void ShowWindow()
{
ChangeFontWindow cw = EditorWindow.GetWindow(true, "Custom/Change Font");
}
static Font defaultFont = new Font("Arial");
static Font toFont = new Font("Arial");
void OnGUI()
{
GUILayout.Space(10);
GUILayout.Label("目标字体:");
toFont = (Font)EditorGUILayout.ObjectField(toFont, typeof(Font), true, GUILayout.MinWidth(100f));
GUILayout.Space(10);
GUILayout.Label("字体类型:");
if (GUILayout.Button("确认修改"))
{
Change();