ProjectStructureCreator/Editor/ProjectStructureCreatorEdit...

41 lines
1.5 KiB
C#
Raw Permalink 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";
[MenuItem("Tools/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-12-30 13:21:20 +03:00
2022-09-22 15:59:32 +03:00
CreateSubFolder($"{AssetPath}", "Scripts");
2023-12-30 13:21:20 +03:00
CreateSubFolder($"{AssetPath}", "Scenes");
CreateSubFolder($"{AssetPath}", "Settings");
2022-09-22 15:59:32 +03:00
CreateSubFolder($"{AssetPath}", "Prefabs");
CreateSubFolder($"{AssetPath}/Prefabs", "UI");
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);
}
}
}