Last active
August 29, 2015 14:19
-
-
Save Ludomancer/cf26ba1ebddfd5bea11a to your computer and use it in GitHub Desktop.
Unity Create Default Folders
This file contains 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("Editor"); | |
CreateDirectory("Materials"); | |
CreateDirectory("Models"); | |
CreateDirectory("Prefabs"); | |
CreateDirectory("Resources"); | |
CreateDirectory("Scenes"); | |
CreateDirectory("Scripts"); | |
CreateDirectory("Scripts/Managers"); | |
CreateDirectory("Shaders"); | |
CreateDirectory("Audio"); | |
CreateDirectory("Textures"); | |
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