ProjectStructureCreator/Editor/ProjectStructureCreatorEdit...

43 lines
1.5 KiB
C#
Raw Normal View History

2022-09-22 15:59:32 +03:00
/*
Author: Syntriax <Syntriax@gmail.com>
2022-09-22 15:59:32 +03:00
Creation Date: 22 September, 2022 - 12:48:16 PM UTC
Signed by an automated program written by the author
*/
using UnityEditor;
namespace Syntriax.Editor
{
public class ProjectStructureCreatorEditor : EditorWindow
{
private const string AssetPath = "Assets";
2022-12-15 19:32:10 +03:00
[MenuItem("Syntriax/Create Project Structure", false, int.MaxValue)]
2022-09-22 15:59:32 +03:00
private static void CreateStructure()
{
CreateSubFolder($"{AssetPath}", "Art");
2022-12-02 18:01:34 +03:00
CreateSubFolder($"{AssetPath}/Art", "Animations");
2022-09-22 15:59:32 +03:00
CreateSubFolder($"{AssetPath}/Art", "Materials");
CreateSubFolder($"{AssetPath}/Art", "Models");
CreateSubFolder($"{AssetPath}/Art", "Textures");
CreateSubFolder($"{AssetPath}/Art", "Audio");
CreateSubFolder($"{AssetPath}/Art/Audio", "Musics");
CreateSubFolder($"{AssetPath}/Art/Audio", "Sounds");
2023-02-13 19:36:36 +03:00
CreateSubFolder($"{AssetPath}", "Resources");
2022-09-22 15:59:32 +03:00
CreateSubFolder($"{AssetPath}", "Scripts");
CreateSubFolder($"{AssetPath}", "Prefabs");
CreateSubFolder($"{AssetPath}/Prefabs", "UI");
2022-09-22 15:59:32 +03:00
CreateSubFolder($"{AssetPath}", "Modules");
2022-09-22 15:59:32 +03:00
}
private static void CreateSubFolder(string parentFolder, string subFolder)
{
if (!AssetDatabase.IsValidFolder($"{parentFolder}/{subFolder}"))
AssetDatabase.CreateFolder(parentFolder, subFolder);
}
}
}