三国卡牌客户端基础资源仓库
hch
9 天以前 7f957ecb475adb30eb692884d22412b765fa1a7d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#if UNITY_EDITOR
using UnityEditor;
using UnityEngine;
using System.Collections;
 
public class FontMakerWindow : EditorWindow {
 
    void OnGUI () {
 
        GUIStyle labelStyle = new GUIStyle();
        labelStyle.normal.textColor = Color.yellow;
        labelStyle.fontSize = 14;
        labelStyle.alignment = TextAnchor.MiddleLeft;
 
        GUIStyle ButtonStyle = new GUIStyle();
        ButtonStyle.normal.textColor = Color.yellow;
        ButtonStyle.fontSize = 14;
        ButtonStyle.alignment = TextAnchor.MiddleCenter;
 
        GUILayout.BeginVertical();
        GUILayout.Space(20);
        EditorGUILayout.LabelField("1.创建一个CustomFont,并为Font指定该CustomFont", labelStyle);
        GUILayout.Space(10);
        EditorGUI.indentLevel += 1;
        GUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("Font", labelStyle);
        FontMaker.m_myFont = EditorGUILayout.ObjectField(FontMaker.m_myFont, typeof(Font)) as Font;
        GUILayout.EndHorizontal();
        EditorGUI.indentLevel -= 1;
        GUILayout.Space(20);
        EditorGUILayout.LabelField("2.将BMF中导出的字体信息文件拷贝到Unity工程中\n并为Data指定该文件", labelStyle);
        GUILayout.Space(10);
        EditorGUI.indentLevel += 1;
        GUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("Data", labelStyle);
        FontMaker.m_data = EditorGUILayout.ObjectField(FontMaker.m_data, typeof(TextAsset)) as TextAsset;
        GUILayout.EndHorizontal();
        EditorGUI.indentLevel -= 1;
        GUILayout.Space(20);
 
        GUILayout.BeginHorizontal();
        GUILayout.Space(150);
        if (GUILayout.Button("创建", GUILayout.Height(40))) {
            FontMaker.GenerateCharacterInfo();
        }
        GUILayout.Space(150);
        GUILayout.EndHorizontal();
        GUILayout.EndVertical();
 
    }
 
}
#endif