示例#1
0
    public override void OnInspectorGUI()
    {
        _getText.TextType = (TextType)EditorGUILayout.EnumPopup("Text Type", _getText.TextType);
        _getText.TextId   = Mathf.Clamp(EditorGUILayout.IntField("Text ID", _getText.TextId), 0, 100500);

        EditorGUILayout.LabelField(_getText.GetComponent <Text>().text);

        if (GUI.changed)
        {
            EditorUtility.SetDirty(target);
            _getText.UpdateText();
        }
    }