示例#1
0
        public static string ObjectFieldOpenFolderPanel(string label, string buttonText, string defaultPath)
        {
            if (!EditorLayout.ObjectFieldButton(label, buttonText))
            {
                return((string)null);
            }
            string str = defaultPath ?? "Assets/";

            if (!Directory.Exists(str))
            {
                str = "Assets/";
            }
            return(EditorUtility.OpenFolderPanel(label, str, string.Empty).Replace(Directory.GetCurrentDirectory() + "/", string.Empty));
        }
示例#2
0
 public static bool Foldout(bool foldout, string content, int leftMargin = 11)
 {
     return(EditorLayout.Foldout(foldout, content, EditorStyles.foldout, leftMargin));
 }
示例#3
0
 public static bool MiniButtonRight(string c)
 {
     return(EditorLayout.miniButton(c, EditorStyles.miniButtonRight));
 }