EditorUtility.OpenFolderPanel
Unity3D 2013. 2. 14. 14:15디렉터리를 선택하고 저장위치를 선택할때 사용.
http://docs.unity3d.com/Documentation/ScriptReference/EditorUtility.OpenFolderPanel.html
EditorUtility.OpenFolderPanel
static function OpenFolderPanel (title : String, folder : String, defaultName : String) : String
Description
Displays the "open folder" dialog and returns the selected path name.
See Also: OpenFilePanel, SaveFolderPanel functions.
Open Folder Panel.
// Opens a directory dialog for copying all the png textures
// in the directory to where the current open scene resides
import System.IO;
@MenuItem("Examples/Load Textures to directory")
static function Apply () {
var path = EditorUtility.OpenFolderPanel("Load png Textures of Directory", "", "");
var files : String[] = Directory.GetFiles(path);
for(var file : String in files)
if(file.EndsWith(".png"))
File.Copy(file, EditorApplication.currentScene);
}
'Unity3D' 카테고리의 다른 글
어셋번들 (AssetBundle / BuildPipeline) 생성 (1) | 2013.02.14 |
---|---|
유니티 어셋번들 (AssetBundle) (1) | 2013.02.14 |
C# 전처리기 지시문 (0) | 2013.02.12 |
유니티 안드로이드 프로젝트를 이클립스에서 실행하기. (0) | 2013.02.01 |
C# 폴더유무 확인해서 폴더생성하고 파일 쓰기 (0) | 2013.01.28 |