Exemplo n.º 1
0
    public override void OnInspectorGUI()
    {
        EditorGUIUtility.LookLikeControls(80f);
        FillText fill = target as FillText;

        string text = fill.text;

        text = EditorGUILayout.TextArea(text, GUI.skin.textArea, GUILayout.Height(100f));

        if (text != fill.text)
        {
            Undo.RegisterUndo(fill, "Fill Text Change");
            EditorUtility.SetDirty(fill);
            fill.text = text;
        }
    }
Exemplo n.º 2
0
    public override void OnInspectorGUI()
    {
#if UNITY_3_5 || UNITY_4_0 || UNITY_4_1 || UNITY_4_2
        EditorGUIUtility.LookLikeControls(80f);
#else
        EditorGUIUtility.labelWidth = 80f;
#endif
        FillText fill = target as FillText;

        string text = fill.text;
        text = EditorGUILayout.TextArea(text, GUI.skin.textArea, GUILayout.Height(100f));

        if (text != fill.text)
        {
#if UNITY_3_5 || UNITY_4_0 || UNITY_4_1 || UNITY_4_2
            Undo.RegisterUndo(fill, "Fill Text Change");
#else
            Undo.RecordObject(fill, "Fill Text Change");
#endif
            EditorUtility.SetDirty(fill);
            fill.text = text;
        }
    }