This script includes additional methods for drawing GUI in Unity Editor.
- ReadonlyTextArea
- ReadonlyTextField
using UnityEngine; | |
using UnityEditor; | |
public static class ExtraEditorGUILayout | |
{ | |
public static void ReadonlyTextArea(string text, params GUILayoutOption[] options) | |
{ | |
EditorGUILayout.SelectableLabel(text, EditorStyles.textArea, options); | |
} | |
public static void ReadonlyTextField(string text, params GUILayoutOption[] options) | |
{ | |
EditorGUILayout.TextField(text, EditorStyles.textField, options); | |
} | |
} |