Esempio n. 1
0
        public static string GetCurrentDirectoryAbsolutePathFromSelection()
        {
            var folderPath = ZenUnityEditorUtil.TryGetSelectedFolderPathInProjectsTab();

            if (folderPath != null)
            {
                return(folderPath);
            }

            var filePath = ZenUnityEditorUtil.TryGetSelectedFilePathInProjectsTab();

            if (filePath != null)
            {
                return(Path.GetDirectoryName(filePath));
            }

            return(Application.dataPath);
        }