Skip to content

Instantly share code, notes, and snippets.

@Ludomancer
Last active August 29, 2015 14:19
Show Gist options
  • Save Ludomancer/cf26ba1ebddfd5bea11a to your computer and use it in GitHub Desktop.
Save Ludomancer/cf26ba1ebddfd5bea11a to your computer and use it in GitHub Desktop.
Unity Create Default Folders
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