blob: b818f21dd2ade2b33c6cf8c73ac7df2e5c1ed314 (
plain)
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
|
using UnityEngine;
using UnityEngine.UI;
namespace UnityEditor.UI
{
// TODO REVIEW
// Have material live under text
// move stencil mask into effects *make an efects top level element like there is
// paragraph and character
/// <summary>
/// Editor class used to edit UI Labels.
/// </summary>
[CustomEditor(typeof(Text), true)]
[CanEditMultipleObjects]
public class TextEditor : GraphicEditor
{
SerializedProperty m_Text;
SerializedProperty m_FontData;
protected override void OnEnable()
{
base.OnEnable();
m_Text = serializedObject.FindProperty("m_Text");
m_FontData = serializedObject.FindProperty("m_FontData");
}
public override void OnInspectorGUI()
{
serializedObject.Update();
EditorGUILayout.PropertyField(m_Text);
EditorGUILayout.PropertyField(m_FontData);
AppearanceControlsGUI();
RaycastControlsGUI();
serializedObject.ApplyModifiedProperties();
}
}
}
|