UnityEditor.EditorGUILayout.PrefixLabel C# (CSharp) Method

PrefixLabel() private method

private PrefixLabel ( GUIContent label ) : void
label UnityEngine.GUIContent
return void
        public static void PrefixLabel(GUIContent label)
        {
            GUIStyle followingStyle = "Button";
            PrefixLabel(label, followingStyle);
        }

Same methods

EditorGUILayout::PrefixLabel ( GUIContent label, GUIStyle followingStyle, GUIStyle labelStyle ) : void
EditorGUILayout::PrefixLabel ( GUIContent label, [ followingStyle ) : void
EditorGUILayout::PrefixLabel ( string label ) : void
EditorGUILayout::PrefixLabel ( string label, GUIStyle followingStyle, GUIStyle labelStyle ) : void
EditorGUILayout::PrefixLabel ( string label, [ followingStyle ) : void

Usage Example

示例#1
0
    public static string ProjectFileBrowser(string title, string description, string file, string extention)
    {
        string path = file;

        EGL.BeginHorizontal();
        {
            EGL.PrefixLabel(title);
            GUILayout.Label(file, Skin.textField);

            string newPath = file;
            if (GUILayout.Button("Browse", GUILayout.Width(64f)))
            {
                newPath = EditorUtility.OpenFilePanel(description, Path.GetFullPath(UPath.GetAbsolutePath(file)), extention);
                if (newPath != string.Empty)
                {
                    newPath = UPath.GetProjectPath(newPath);
                }
                else
                {
                    newPath = file;
                }
            }
            path = newPath;
        }
        EGL.EndHorizontal();

        return(path);
    }
All Usage Examples Of UnityEditor.EditorGUILayout::PrefixLabel