Exemplo n.º 1
0
        static void CreateFolderSymLink()
        {
            DirectoryEntry selectedFolder = EditorIO.OpenFolderPanelV2("Select a folder to link into Assets");
            var            targetFolder   = EditorIO.GetAssetsFolder();

            try { targetFolder = EditorIO.GetFolderOfCurrentSelectedObject(); } catch (System.Exception) { }
            targetFolder = targetFolder.GetChildDir(selectedFolder.Name);
            SymLinker.CreateSymlink(selectedFolder, targetFolder);
            AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate);
        }
Exemplo n.º 2
0
        static void CreateDefaultGitIgnoreFiles()
        {
            var projectFolder = EditorIO.GetProjectFolder();
            var assetsFolder  = EditorIO.GetAssetsFolder();

            if (!assetsFolder.Exists)
            {
                throw Log.e("Not the project folder: " + projectFolder);
            }
            var file = projectFolder.GetChild(".gitignore");

            if (!file.Exists)
            {
                EditorCoroutineRunner.StartCoroutine(DownloadDefaultUnityGitIgnore(file));
            }
            else
            {
                Log.d("No need to download .gitignore, was already found: " + file);
            }
            GitIgnoreUdater.AddAllSymlinksToGitIgnores(assetsFolder);
            AssetFolderAnalysis.FindFolderAnomalies(assetsFolder);
        }
Exemplo n.º 3
0
 static void DidReloadScripts()
 {
     LogAllEmptyFoldersIn(EditorIO.GetAssetsFolder());
 }