37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using System.IO;
|
|
using AlicizaX.Runtime;
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
namespace AlicizaX.Editor
|
|
{
|
|
static class FrameworkAssetInitlized
|
|
{
|
|
[MenuItem("AlicizaX/初始化配置文件")]
|
|
static void Initlize()
|
|
{
|
|
string FloderPath = "Assets/Resources/";
|
|
if (!Directory.Exists(FloderPath))
|
|
{
|
|
Directory.CreateDirectory(FloderPath);
|
|
}
|
|
|
|
string publisherPath = Path.Combine(FloderPath, "FrameworkPublishSettings.asset");
|
|
string hotPath = Path.Combine(FloderPath, "FrameworkHotUpdateSettings.asset");
|
|
if (!File.Exists(publisherPath))
|
|
{
|
|
var publisherObject = ScriptableObject.CreateInstance<FrameworkPublishSettings>();
|
|
AssetDatabase.CreateAsset(publisherObject, publisherPath);
|
|
}
|
|
|
|
if (!File.Exists(hotPath))
|
|
{
|
|
var hotObject = ScriptableObject.CreateInstance<FrameworkHotUpdateSettings>();
|
|
AssetDatabase.CreateAsset(hotObject, hotPath);
|
|
}
|
|
|
|
AssetDatabase.Refresh();
|
|
}
|
|
}
|
|
}
|