Version: 2017.3
public static string CreateFolder (string parentFolder, string newFolderName);

파라미터

parentFolder The name of the parent folder.
newFolderName The name of the new folder.

반환

string The GUID of the newly created folder.

설명

Create a new folder.

using UnityEngine;
using UnityEditor;

public class CreateFolderExample : MonoBehaviour { [MenuItem("GameObject/Create Folder")] static void CreateMaterial() { string guid = AssetDatabase.CreateFolder("Assets", "My Folder"); string newFolderPath = AssetDatabase.GUIDToAssetPath(guid); } }