2022-09-22 15:59:32 +03:00
|
|
|
/*
|
2022-11-13 17:00:17 +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";
|
|
|
|
|
2023-02-13 19:37:03 +03:00
|
|
|
[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");
|
2022-11-13 16:58:51 +03:00
|
|
|
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");
|
|
|
|
|
2022-11-13 16:58:51 +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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|