文档

Unity Engine

Unity Engine

SelectableLabel

Make a selectable label field. (Useful for showing read-only info that can be copy-pasted.)
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule

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.