Unity/Unity Study
자동 폴더 만들기.
붕대마음
2013. 10. 20. 14:37
반응형
참고 : http://usroom.tistory.com/230
using UnityEngine;
//using System.Collections;
using UnityEditor;
using System.IO;
public class MakeFolder : MonoBehaviour
{
[MenuItem("Custom Menu/Make Default Folder")]
static public void GenerateFolders()
{
string projectPath = Application.dataPath + "/";
Directory.CreateDirectory(projectPath + "_audio");
Directory.CreateDirectory(projectPath + "_material");
Directory.CreateDirectory(projectPath + "_textures");
Directory.CreateDirectory(projectPath + "_meshes");
Directory.CreateDirectory(projectPath + "_note");
Directory.CreateDirectory(projectPath + "_prefab");
Directory.CreateDirectory(projectPath + "_script");
Directory.CreateDirectory(projectPath + "_sound");
Directory.CreateDirectory(projectPath + "_scene");
Directory.CreateDirectory(projectPath + "_fonts");
Directory.CreateDirectory(projectPath + "_shaders");
AssetDatabase.Refresh();
}
}
대략 이렇게 만들어 주고 유니티를 껏다 켜면(안껏다 켜고 리프레시 되는 방법은 몰겠음.ㅜㅜ)
위와같이 코드에 추가 한 것과 같은 메뉴가새로 생성되었다.
이제 위의 버튼을 눌러보면...
아잉 씬나라~!!