This commit is contained in:
PC-20230316NUNE\Administrator
2024-10-16 20:41:40 +08:00
parent 44c3ea001a
commit 6da2f9e691
1866 changed files with 36068 additions and 25732 deletions

View File

@@ -1,6 +1,8 @@
using System.IO;
using System.Collections.Generic;
using System.IO;
using HybridCLR.Editor;
using HybridCLR.Editor.Commands;
using HybridCLR.Editor.Settings;
using UnityEditor;
using UnityEngine;
@@ -24,6 +26,32 @@ namespace SHFrame.Editor
return s.Substring(s.IndexOf("Assets/"));
}
// [MenuItem("HybridCLR/Build/CopyIDEDllAotAssemblies")]
// public static void CopyIDEDllAotAssemblies()
// {
// var externalDirs = HybridCLRSettings.Instance.externalHotUpdateAssembliyDirs;
// var dstPath = SettingsUtil.GetAssembliesPostIl2CppStripDir(EditorUserBuildSettings.activeBuildTarget);
// List<string> allHotUpdateDllNames = SettingsUtil.HotUpdateAssemblyNamesExcludePreserved;
//
// foreach (var dir in externalDirs)
// {
// DirectoryInfo root = new DirectoryInfo(dir);
// FileInfo[] files = root.GetFiles("*.dll");
// foreach (var fp in files)
// {
// string fileouExt = Path.GetFileNameWithoutExtension(fp.FullName);
// string file = fp.Name;
// if (allHotUpdateDllNames.Contains(fileouExt))
// {
// Debug.Log($"[CopyIDEDllAotAssemblies] 过滤热更新assembly:{file}");
// continue;
// }
// Debug.Log($"[CopyIDEDllAotAssemblies] copy strip dll :{fp.FullName} ===>>> :{dstPath}/{file}");
// File.Copy($"{fp.FullName}", $"{dstPath}/{file}", true);
// }
// }
// }
[MenuItem("HybridCLR/Build/泛型补充dll与热更新dll导出")]
public static void BuildAndCopyABAOTHotUpdateDlls()
{

View File

@@ -19,12 +19,14 @@ namespace SHFrame.Editor
{
"Assembly-CSharp",
"SHFrame.Runtime",
"HotMain",
};
private static readonly string[] RuntimeOrEditorAssemblyNames =
{
"Assembly-CSharp",
"SHFrame.Runtime",
"HotMain",
};
/// <summary>

View File

@@ -8,6 +8,7 @@
{
/// <summary> 事件派发器 </summary>
private static EventDispatcher dispatcher = new EventDispatcher();
public static EventDispatcher Dispatcher => dispatcher;
/// <summary> 添加事件监听器 </summary>
/// <param name="eventType">事件类型</param>

View File

@@ -6,14 +6,6 @@ using FairyGUI;
namespace SHFrame
{
public enum UILayerEnum
{
Root, //添加到根节点
View,
Window,
Pop,
Guide
}
public class UIModule : Module
{
@@ -22,9 +14,6 @@ namespace SHFrame
public string CurKey { private set; get; } = "";
private GComponent ViewRoot { get; set; }
private GComponent WindowRoot { get; set; }
private GComponent PopRoot { get; set; }
private GComponent GuideRoot { get; set; }
/// <summary>
/// 游戏框架模块初始化。
@@ -48,9 +37,6 @@ namespace SHFrame
public void InitUIModule(GComponent view, GComponent window, GComponent pop, GComponent guide)
{
ViewRoot = view;
WindowRoot = window;
PopRoot = pop;
GuideRoot = guide;
}
public void MakeFullScreen(GObject gObject)
@@ -76,9 +62,11 @@ namespace SHFrame
/// <param name="resName">ui的resName</param>
/// <param name="layer"></param>
/// <param name="param"></param>
public async UniTask Open<TClassType>(string pkgName, string resName, UILayerEnum layer, params object[] param)
public async UniTask Open<TClassType>(string pkgName, string resName, GComponent root = null, params object[] param)
where TClassType : UIBase, new()
{
if (root is null) root = GRoot.inst;
var key = pkgName + "/" + resName;
UIMap.TryGetValue(key, out var uiClass);
@@ -99,27 +87,6 @@ namespace SHFrame
UIMap[key].OnInit();
}
GComponent root;
switch (layer)
{
case UILayerEnum.Root:
root = GRoot.inst;
break;
case UILayerEnum.View:
root = ViewRoot;
break;
case UILayerEnum.Window:
root = WindowRoot;
break;
case UILayerEnum.Guide:
root = GuideRoot;
break;
default:
throw new ArgumentOutOfRangeException(nameof(layer), layer, null);
}
// root.RemoveChildren();
// root.visible = true;
// if (root.parent != null)