UnityEditor.EditorGUILayout.LinkLabel C# (CSharp) Method

LinkLabel() static private method

static private LinkLabel ( GUIContent label ) : bool
label UnityEngine.GUIContent
return bool
        internal static bool LinkLabel(GUIContent label, params GUILayoutOption[] options)
        {
            Rect position = s_LastRect = GUILayoutUtility.GetRect(label, EditorStyles.linkLabel, options);
            Handles.BeginGUI();
            Handles.color = EditorStyles.linkLabel.normal.textColor;
            Handles.DrawLine(new Vector3(position.xMin, position.yMax), new Vector3(position.xMax, position.yMax));
            Handles.color = Color.white;
            Handles.EndGUI();
            EditorGUIUtility.AddCursorRect(position, MouseCursor.Link);
            return GUI.Button(position, label, EditorStyles.linkLabel);
        }

Same methods

EditorGUILayout::LinkLabel ( string label ) : bool

Usage Example

示例#1
0
 private static void ComponentBasedWorkflowButton()
 {
     GUILayout.BeginHorizontal();
     if (EditorGUILayout.LinkLabel(s_Styles.m_LearnAboutComponent))
     {
         Help.BrowseURL("https://github.com/Unity-Technologies/NavMeshComponents");
     }
     GUILayout.EndHorizontal();
 }
All Usage Examples Of UnityEditor.EditorGUILayout::LinkLabel