Esempio n. 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));
        }
Esempio n. 2
0
 public static bool Foldout(bool foldout, string content, int leftMargin = 11)
 {
     return(EditorLayout.Foldout(foldout, content, EditorStyles.foldout, leftMargin));
 }
Esempio n. 3
0
 public static bool MiniButtonRight(string c)
 {
     return(EditorLayout.miniButton(c, EditorStyles.miniButtonRight));
 }