Files
Cielonos/Assets/Plugins/FlexibleUI/Editor/PresetSavePath.cs
SoulliesOfficial 649b7a5ddc 更新
2026-05-23 08:27:50 -04:00

21 lines
563 B
C#

using System.IO;
using UnityEditor;
using UnityEngine;
namespace JeffGrawAssets.FlexibleUI
{
public static class PresetSavePath
{
private const string PresetDirectory = "UI/Presets";
public static string GetPresetSavePath(string assetName)
{
var fullPath = Path.Combine(Application.dataPath, PresetDirectory);
if (!Directory.Exists(fullPath))
Directory.CreateDirectory(fullPath);
var path = AssetDatabase.GenerateUniqueAssetPath(Path.Combine("Assets", PresetDirectory, assetName));
return path;
}
}
}