Skip to content

Instantly share code, notes, and snippets.

@hasanbayatme
Created July 14, 2019 05:00
Show Gist options
  • Save hasanbayatme/345f4313904473ed24b1ac4430e7a164 to your computer and use it in GitHub Desktop.
Save hasanbayatme/345f4313904473ed24b1ac4430e7a164 to your computer and use it in GitHub Desktop.
Extra Editor GUI Layouot Methods for drawing GUI, such as ReadonlyTextArea, ReadonlyTextField and more.

Extra Editor GUI Layout

This script includes additional methods for drawing GUI in Unity Editor.

Methods

  • 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);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment