Add hot-update boot pipeline, UI bundles/atlas assets, and design docs.
Ignore AIClient/Library and AIClient/HybridCLRData permanently; include HybridCLR/YooAsset project setup and UI tooling. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
#if UNITY_EDITOR
|
||||
using HybridCLR.Editor;
|
||||
using HybridCLR.Editor.Settings;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AOT.Editor.HybridCLR
|
||||
{
|
||||
/// <summary>
|
||||
/// 将 HotUpdate.Runtime 登记为 HybridCLR 热更程序集。
|
||||
/// </summary>
|
||||
public static class ConfigureHotUpdateAssemblies
|
||||
{
|
||||
const string HotUpdateAsmdef = "Assets/HotUpdate/Scripts/HotUpdate.Runtime.asmdef";
|
||||
|
||||
[MenuItem("AIGame/HybridCLR/Configure HotUpdate Assemblies")]
|
||||
public static string Configure()
|
||||
{
|
||||
var asmdef = AssetDatabase.LoadAssetAtPath<UnityEditorInternal.AssemblyDefinitionAsset>(HotUpdateAsmdef);
|
||||
if (asmdef == null)
|
||||
return $"missing asmdef: {HotUpdateAsmdef}";
|
||||
|
||||
var settings = HybridCLRSettings.Instance;
|
||||
settings.hotUpdateAssemblyDefinitions = new[] { asmdef };
|
||||
HybridCLRSettings.Save();
|
||||
AssetDatabase.SaveAssets();
|
||||
return $"ok HotUpdateAssemblies=[{asmdef.name}] enable={settings.enable}";
|
||||
}
|
||||
|
||||
public static string Status()
|
||||
{
|
||||
var settings = HybridCLRSettings.Instance;
|
||||
int n = settings.hotUpdateAssemblyDefinitions?.Length ?? 0;
|
||||
string names = n == 0
|
||||
? "(none)"
|
||||
: string.Join(",", System.Array.ConvertAll(settings.hotUpdateAssemblyDefinitions, a => a != null ? a.name : "null"));
|
||||
return $"enable={settings.enable} count={n} defs=[{names}]";
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user