大橙子网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
这期内容当中小编将会给大家带来有关使用Unity如何快速生成一个文件夹,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。
网站建设、基于H5建站技术的Web开发、手机站开发、微信开发等互联网应用服务。成都创新互联始终关注着互联网行业的前沿动态,创新互联坚信:真诚的态度,勤奋的工作是我们赢得客户信赖的基础;而不断创新、力求完美,才是创新互联共同迈向美好未来的保证。代码
using UnityEngine; using System.Collections; using System.IO; using UnityEditor; public class FolderGenerator { [MenuItem("Tools/生成常用文件夹--GenerateFolders")] private static void GenerateFolder() { string resPath = Application.dataPath + "/Resources/";//resources路径 string path = Application.dataPath + "/";//路径 Directory.CreateDirectory(resPath + "Audio"); Directory.CreateDirectory(resPath + "Materials"); Directory.CreateDirectory(resPath + "Prefabs"); Directory.CreateDirectory(resPath + "Shaders"); Directory.CreateDirectory(resPath + "Textures"); Directory.CreateDirectory(path + "Scenes"); Directory.CreateDirectory(path + "Editor"); Directory.CreateDirectory(path + "StreamingAssets"); Directory.CreateDirectory(path + "Scripts"); AssetDatabase.Refresh(); Debug.Log("Folders Created"); } } }