EditorGUI.hyperLinkClicked
EditorGUI-hyperLinkClicked - Unity スクリプトリファレンス
<a>
タグで囲ったテキストのクリック時の処理を登録できる。
なお、hrefはデフォルト登録されているので実装は不要。
対応しているレイアウト
EditorGUILayout.TextField
や EditorGUILayout.SelectableLabel
に対応している
表示するだけなら、後者で良いと思うが
勝手にスクロール表示になったりするので注意
以下みたいにしておけば、普通のラベル表示っぽくできる
GUIStyle labelStyle =new GUIStyle(GUI.skin.label); labelStyle.wordWrap =true; labelStyle.richText =true; var height = labelStyle.CalcHeight(new GUIContent(Text), EditorGUIUtility.currentViewWidth); EditorGUILayout.SelectableLabel(Text, labelStyle, GUILayout.Height(height));