Created
August 28, 2015 16:40
-
-
Save rogerluiz/ecc79e1fb2e130d37d22 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections.Generic; | |
| using UnityEditor; | |
| using System.IO; | |
| internal class CreateDefaultFolders | |
| { | |
| [MenuItem("Custom/Create Default Folders")] | |
| private static void CreateFolders() | |
| { | |
| CreateDirectory("Animations"); | |
| CreateDirectory("Animations/Clips"); | |
| CreateDirectory("Animations/Controllers"); | |
| CreateDirectory("Editor"); | |
| CreateDirectory("Materials"); | |
| CreateDirectory("Prefabs"); | |
| CreateDirectory("Resources"); | |
| CreateDirectory("Scenes"); | |
| CreateDirectory("Scripts"); | |
| CreateDirectory("Shaders"); | |
| CreateDirectory("Audio"); | |
| CreateDirectory("Sprites"); | |
| CreateDirectory("Scenes"); | |
| CreateDirectory("Fonts"); | |
| AssetDatabase.Refresh(); | |
| } | |
| private static void CreateDirectory(string name) | |
| { | |
| string path = Path.Combine(Application.dataPath, name); | |
| if (!Directory.Exists(path)) | |
| { | |
| Directory.CreateDirectory(path); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment