Exemplo n.º 1
0
        /// <summary>
        /// 创建Scene
        /// </summary>
        /// <param 场景名称="sceneName"></param>
        /// <param 场景存储文件夹路径="path"></param>
        private static void CreateScene(string sceneName, string path)
        {
            EditorUtil.CheckFolder(path);
            Scene scene = EditorSceneManager.NewScene(NewSceneSetup.DefaultGameObjects, NewSceneMode.Single);

            EditorSceneManager.SaveScene(scene, Path.Combine(path, sceneName + ".unity"));
        }
Exemplo n.º 2
0
 /// <summary>
 /// 创建文件夹
 /// </summary>
 /// <param name="folderPath"></param>
 private static void GenerateDirectory(string folderPath)
 {
     EditorUtil.CheckFolder(folderPath);
 }