Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SelectableLabel

Make a selectable label field. (Useful for showing read-only info that can be copy-pasted.)
Read time 1 minuteLast updated 11 days ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor

SelectableLabel(string, GUILayoutOption[])

Make a selectable label field. (Useful for showing read-only info that can be copy-pasted.)
public static void SelectableLabel(string text, params GUILayoutOption[] options)

Parameters

text

The text to show.

An optional list of layout options that specify extra layout properties. Any values passed in here will override settings defined by the
style
.
Additional Resources: GUILayout.Width, GUILayout.Height, GUILayout.MinWidth, GUILayout.MaxWidth, GUILayout.MinHeight, GUILayout.MaxHeight, GUILayout.ExpandWidth, GUILayout.ExpandHeight.

SelectableLabel(string, GUIStyle, GUILayoutOption[])

Make a selectable label field. (Useful for showing read-only info that can be copy-pasted.)
public static void SelectableLabel(string text, GUIStyle style, params GUILayoutOption[] options)

Parameters

text

The text to show.

Optional GUIStyle.

An optional list of layout options that specify extra layout properties. Any values passed in here will override settings defined by the
style
.
Additional Resources: GUILayout.Width, GUILayout.Height, GUILayout.MinWidth, GUILayout.MaxWidth, GUILayout.MinHeight, GUILayout.MaxHeight, GUILayout.ExpandWidth, GUILayout.ExpandHeight.