private static void DirectoryButton(SerializedProperty sP, DirectoryAttribute dA, string path)
    {
        if (!GUIExtensions.ButtonOverPreviousControl())
        {
            return;
        }

        string newDirectory = EditorUtility.OpenFolderPanel("Choose Directory", path, path.Equals("Assets") ? string.Empty : path);

        if (string.IsNullOrEmpty(newDirectory))
        {
            return;
        }
        if (dA.unityDirectory)
        {
            if (!newDirectory.StartsWith(Application.dataPath))
            {
                Debug.LogWarning("Directory must be local to project, eg. Assets...");
                return;
            }

            sP.stringValue = "Assets" + newDirectory.Substring(Application.dataPath.Length);
        }
        else
        {
            sP.stringValue = newDirectory;
        }
    }