优化事件系统

This commit is contained in:
陈思海 2025-11-14 11:38:43 +08:00
parent 6dea74ee0f
commit e6fd735226
7 changed files with 65 additions and 69 deletions

View File

@ -4,7 +4,6 @@ using AlicizaX.UI.Runtime;
using Cysharp.Threading.Tasks;
using Game.UI;
using GameLogic.Event;
using GameLogic.Event.Generated;
using UnityEngine;
[UIUpdate]
@ -20,7 +19,7 @@ public class UILoadUpdate : UITabWindow<ui_UILoadUpdateWindow>
protected override void OnRegisterEvent(EventListenerProxy proxy)
{
base.OnRegisterEvent(proxy);
EventPublisher.Subscribe(OnHandleTestUIOpenEevent);
proxy.AddUIEvent<TestUIOpenEvent>(OnHandleTestUIOpenEevent);
}
private void OnHandleTestUIOpenEevent(TestUIOpenEvent obj)

View File

@ -4,7 +4,6 @@ using System.Collections.Generic;
using AlicizaX.Resource.Runtime;
using AlicizaX.Localization.Runtime;
using AlicizaX;
using AlicizaX.Framework.Runtime.Event.Generated;
using Cysharp.Threading.Tasks;
using UnityEngine;
@ -17,7 +16,7 @@ namespace Unity.Startup.Procedure
public static void Start()
{
eventRuntimeHandle = EventPublisher.Subscribe(SetProgressUpdate);
eventRuntimeHandle = EventPublisher.Subscribe<AssetDownloadProgressUpdateEventArgs>(SetProgressUpdate);
}
public static void Dispose()

View File

@ -1,6 +1,5 @@
using AlicizaX.Resource.Runtime;
using AlicizaX;
using AlicizaX.Framework.Runtime.Event.Generated;
using Cysharp.Threading.Tasks;
using UnityEngine;
using YooAsset;

@ -1 +1 @@
Subproject commit 69699074de4e895c427c7670bf5ccbb0dd30e6fd
Subproject commit a1af4b9165529d445f3dbc932c7920fad8094815

View File

@ -19,7 +19,7 @@ MonoBehaviour:
width: 1920
height: 997
m_ShowMode: 4
m_Title: Game
m_Title: Inspector
m_RootView: {fileID: 4}
m_MinSize: {x: 875, y: 300}
m_MaxSize: {x: 10000, y: 10000}
@ -41,10 +41,10 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 349
width: 448
width: 310
height: 598
m_MinSize: {x: 51, y: 71}
m_MaxSize: {x: 4001, y: 4021}
m_MinSize: {x: 50, y: 50}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 14}
m_Panes:
- {fileID: 14}
@ -69,12 +69,12 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 448
width: 310
height: 947
m_MinSize: {x: 100, y: 100}
m_MaxSize: {x: 8096, y: 16192}
vertical: 1
controlID: 5119
controlID: 26
draggingID: 0
--- !u!114 &4
MonoBehaviour:
@ -173,7 +173,7 @@ MonoBehaviour:
m_MinSize: {x: 400, y: 100}
m_MaxSize: {x: 32384, y: 16192}
vertical: 0
controlID: 123
controlID: 159
draggingID: 0
--- !u!114 &8
MonoBehaviour:
@ -192,10 +192,10 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 448
width: 310
height: 349
m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4001, y: 4021}
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 16}
m_Panes:
- {fileID: 15}
@ -219,14 +219,14 @@ MonoBehaviour:
- {fileID: 11}
m_Position:
serializedVersion: 2
x: 448
x: 310
y: 0
width: 297
width: 214
height: 947
m_MinSize: {x: 100, y: 100}
m_MaxSize: {x: 8096, y: 16192}
vertical: 1
controlID: 48
controlID: 71
draggingID: 0
--- !u!114 &10
MonoBehaviour:
@ -245,10 +245,10 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 297
width: 214
height: 454
m_MinSize: {x: 202, y: 221}
m_MaxSize: {x: 4002, y: 4021}
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 17}
m_Panes:
- {fileID: 17}
@ -271,7 +271,7 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 454
width: 297
width: 214
height: 493
m_MinSize: {x: 100, y: 100}
m_MaxSize: {x: 4000, y: 4000}
@ -295,9 +295,9 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 745
x: 524
y: 0
width: 461
width: 718
height: 947
m_MinSize: {x: 232, y: 271}
m_MaxSize: {x: 10002, y: 10021}
@ -321,12 +321,12 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 1206
x: 1242
y: 0
width: 714
width: 678
height: 947
m_MinSize: {x: 276, y: 71}
m_MaxSize: {x: 4001, y: 4021}
m_MinSize: {x: 275, y: 50}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 20}
m_Panes:
- {fileID: 20}
@ -354,7 +354,7 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 422
width: 447
width: 309
height: 577
m_SerializedDataModeController:
m_DataMode: 0
@ -408,10 +408,10 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 21
width: 447
width: 309
height: 556
m_Scale: {x: 0.2328125, y: 0.2328125}
m_Translation: {x: 223.5, y: 278}
m_Scale: {x: 0.1609375, y: 0.1609375}
m_Translation: {x: 154.5, y: 278}
m_MarginLeft: 0
m_MarginRight: 0
m_MarginTop: 0
@ -419,12 +419,12 @@ MonoBehaviour:
m_LastShownAreaInsideMargins:
serializedVersion: 2
x: -960
y: -1194.094
y: -1727.3787
width: 1920
height: 2388.188
height: 3454.7573
m_MinimalGUI: 1
m_defaultScale: 0.2328125
m_LastWindowPixelSize: {x: 447, y: 577}
m_defaultScale: 0.1609375
m_LastWindowPixelSize: {x: 309, y: 577}
m_ClearInEditMode: 1
m_NoCameraWarning: 1
m_LowResolutionForAspectRatios: 01000000000000000000
@ -522,7 +522,7 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 73
width: 447
width: 309
height: 328
m_SerializedDataModeController:
m_DataMode: 0
@ -578,7 +578,7 @@ MonoBehaviour:
collapsed: 0
displayed: 0
snapOffset: {x: 0, y: 0}
snapOffsetDelta: {x: 0, y: 25}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 1
id: unity-search-toolbar
index: 1
@ -630,7 +630,7 @@ MonoBehaviour:
collapsed: 0
displayed: 0
snapOffset: {x: 0, y: 0}
snapOffsetDelta: {x: 0, y: 25}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
id: Scene View/Light Settings
index: 0
@ -656,7 +656,7 @@ MonoBehaviour:
collapsed: 0
displayed: 0
snapOffset: {x: 0, y: 0}
snapOffsetDelta: {x: 0, y: 25}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
id: Scene View/Cloth Constraints
index: 1
@ -669,7 +669,7 @@ MonoBehaviour:
collapsed: 0
displayed: 0
snapOffset: {x: 0, y: 0}
snapOffsetDelta: {x: 0, y: 25}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
id: Scene View/Cloth Collisions
index: 2
@ -721,7 +721,7 @@ MonoBehaviour:
collapsed: 0
displayed: 0
snapOffset: {x: 0, y: 0}
snapOffsetDelta: {x: 0, y: 25}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
id: Scene View/Occlusion Culling
index: 3
@ -734,7 +734,7 @@ MonoBehaviour:
collapsed: 0
displayed: 0
snapOffset: {x: 0, y: 0}
snapOffsetDelta: {x: 0, y: 25}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
id: Scene View/Physics Debugger
index: 4
@ -747,7 +747,7 @@ MonoBehaviour:
collapsed: 0
displayed: 0
snapOffset: {x: 0, y: 0}
snapOffsetDelta: {x: 0, y: 25}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
id: Scene View/Scene Visibility
index: 5
@ -760,7 +760,7 @@ MonoBehaviour:
collapsed: 0
displayed: 0
snapOffset: {x: 0, y: 0}
snapOffsetDelta: {x: 0, y: 25}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
id: Scene View/Particles
index: 6
@ -1030,7 +1030,7 @@ MonoBehaviour:
m_OverlaysVisible: 1
m_WindowGUID: f6827acf47ff6e841a7f3bef03f3908f
m_Gizmos: 1
m_OverrideSceneCullingMask: 0
m_OverrideSceneCullingMask: 6917529027641081856
m_SceneIsLit: 0
m_SceneLighting: 1
m_2DMode: 1
@ -1038,9 +1038,9 @@ MonoBehaviour:
m_PlayAudio: 0
m_AudioPlay: 0
m_Position:
m_Target: {x: 995.80457, y: 484.69873, z: -7.1010976}
m_Target: {x: 1000, y: 1000, z: 100}
speed: 2
m_Value: {x: 995.80457, y: 484.69873, z: -7.1010976}
m_Value: {x: 1000, y: 1000, z: 100}
m_RenderMode: 0
m_CameraMode:
drawMode: 0
@ -1090,9 +1090,9 @@ MonoBehaviour:
speed: 2
m_Value: {x: 0, y: 0, z: 0, w: 1}
m_Size:
m_Target: 791.50287
m_Target: 10.198668
speed: 2
m_Value: 791.50287
m_Value: 10.198668
m_Ortho:
m_Target: 1
speed: 2
@ -1137,9 +1137,9 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 448
x: 310
y: 73
width: 295
width: 212
height: 433
m_SerializedDataModeController:
m_DataMode: 0
@ -1154,9 +1154,9 @@ MonoBehaviour:
m_SceneHierarchy:
m_TreeViewState:
scrollPos: {x: 0, y: 0}
m_SelectedIDs: 0aaf0000
m_LastClickedID: 44810
m_ExpandedIDs: 2440ffff3440ffff0aaf0000
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 22fbffff
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -1200,9 +1200,9 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 448
x: 310
y: 527
width: 295
width: 212
height: 472
m_SerializedDataModeController:
m_DataMode: 0
@ -1234,9 +1234,9 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 745
x: 524
y: 73
width: 459
width: 716
height: 926
m_SerializedDataModeController:
m_DataMode: 0
@ -1258,8 +1258,7 @@ MonoBehaviour:
m_ShowAllHits: 0
m_SkipHidden: 0
m_SearchArea: 1
m_Folders:
- Assets/Bundles/UI
m_Folders: []
m_Globs: []
m_OriginalText:
m_ImportLogFlags: 0
@ -1275,7 +1274,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs: e48c0000
m_LastClickedID: 36068
m_ExpandedIDs: 000000002c270000cc330000aa7f0000ac7f0000ae7f0000b07f0000b27f0000b47f0000b67f0000b87f0000ba7f0000bc7f0000be7f0000c07f0000c27f0000c47f0000c67f0000c87f0000ca7f0000cc7f0000ce7f0000d07f0000d27f0000d47f0000d67f0000d87f0000da7f0000dc7f0000de7f0000e07f0000e27f0000e47f0000e67f0000e87f0000ea7f0000ec7f0000ee7f0000f07f0000f27f0000f47f0000f67f0000f87f0000fa7f0000fc7f0000fe7f000000800000028000000480000006800000088000000a8000000c8000000e80000010800000128000001480000016800000188000001a8000001c8000001e80000020800000228000002480000026800000288000002a8000002c8000002e80000030800000328000003480000036800000388000003a8000003c8000003e80000040800000428000004480000046800000488000004a8000004c8000004e80000050800000528000005480000056800000588000005a8000005c8000005e80000060800000628000006480000066800000688000006a8000006c8000006e80000070800000728000007480000076800000788000007a8000007c8000007e80000080800000828000008480000086800000888000008a8000008c8000008e80000090800000928000009480000096800000988000009a8000009c8000009e800000a0800000a2800000a4800000a6800000a8800000aa800000ac800000ae800000b0800000b2800000b4800000b6800000b8800000ba800000bc800000be800000c0800000c2800000c4800000c6800000c8800000ca800000cc800000ce800000d0800000d2800000d4800000d6800000d8800000da800000dc800000de800000e0800000e2800000e4800000e6800000e8800000ea800000ec800000ee800000f0800000f2800000f4800000f6800000f8800000fa800000fc800000fe80000000810000028100000481000006810000088100000a8100000c8100000e81000010810000128100001481000016810000188100001a8100001c8100001e810000208100002281000024810000
m_ExpandedIDs: 000000007a280000ee800000f0800000f2800000f4800000f6800000f8800000fa800000fc800000fe80000000810000028100000481000006810000088100000a8100000c8100000e81000010810000128100001481000016810000188100001a8100001c8100001e81000020810000228100002481000026810000288100002a8100002c8100002e81000030810000328100003481000036810000388100003a8100003c8100003e81000040810000428100004481000046810000488100004a8100004c8100004e81000050810000528100005481000056810000588100005a8100005c8100005e81000060810000628100006481000066810000688100006a8100006c8100006e81000070810000728100007481000076810000788100007a8100007c8100007e81000080810000828100008481000086810000888100008a8100008c8100008e81000090810000928100009481000096810000988100009a8100009c8100009e810000a0810000a2810000a4810000a6810000a8810000aa810000ac810000ae810000b0810000b2810000b4810000b6810000b8810000ba810000bc810000be810000c0810000c2810000c4810000c6810000c8810000ca810000cc810000ce810000d0810000d2810000d4810000d6810000d8810000da810000dc810000de810000e0810000e2810000e4810000e6810000e8810000ea810000ec810000ee810000f0810000f2810000f4810000f6810000f8810000fa810000fc810000fe81000000820000028200000482000006820000088200000a8200000c8200000e82000010820000128200001482000016820000188200001a8200001c8200001e82000020820000228200002482000026820000288200002a8200002c8200002e82000030820000328200003482000036820000388200003a8200003c8200003e82000040820000428200004482000046820000488200004a8200004c8200004e82000050820000528200005482000056820000588200005a8200005c8200005e820000608200006282000064820000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -1303,18 +1302,18 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: ffffffff000000002c270000cc330000aa7f0000ae7f0000b07f0000b27f0000b47f0000b67f0000b87f0000ba7f0000bc7f0000be7f0000c07f0000c27f0000c47f0000c67f0000c87f0000ca7f0000cc7f0000ce7f0000d07f0000d27f0000d47f0000d67f0000d87f0000da7f0000dc7f0000de7f0000e07f0000e27f0000e47f0000e67f0000e87f0000ea7f0000ec7f0000ee7f0000f07f0000f27f0000f47f0000f67f0000f87f0000fa7f0000fc7f0000fe7f000000800000028000000480000006800000088000000a8000000c8000000e80000010800000128000001480000016800000188000001a8000001c8000001e8000002280000026800000288000002a8000002c8000002e80000030800000328000003480000036800000388000003a8000003c8000003e80000040800000428000004480000046800000488000004a8000004c8000004e80000050800000528000005480000056800000588000005a8000005c8000005e80000060800000628000006480000066800000688000006a8000006c8000006e80000070800000728000007480000076800000788000007a8000007c8000007e80000080800000828000008480000086800000888000008a8000008c8000008e80000090800000928000009480000096800000988000009a8000009c8000009e800000a0800000a2800000a4800000a6800000a8800000aa800000ac800000ae800000b0800000b2800000b4800000b6800000b8800000ba800000bc800000be800000c0800000c2800000c4800000c6800000c8800000ca800000cc800000ce800000d0800000d2800000d4800000d6800000d8800000da800000dc800000de800000e0800000e2800000e4800000e6800000e8800000ea800000ec800000f0800000f2800000f4800000f6800000fc800000fe80000000810000028100000481000006810000088100000a8100000c8100000e810000108100001281000014810000188100001a81000022810000a4810000a8810000e88e0000a4920000a6920000b8920000e0920000f4920000ffffff7f
m_ExpandedIDs: ffffffff00000000ee800000f0800000f2800000f4800000f6800000f8800000fa800000fc800000fe80000000810000028100000481000006810000088100000a8100000c8100000e81000010810000128100001481000016810000188100001c8100001e81000020810000228100002481000026810000288100002a8100002c8100002e81000030810000328100003481000036810000388100003a8100003c8100003e810000428100004481000046810000488100004a8100004c8100004e81000050810000528100005481000056810000588100005a8100005c8100005e81000060810000628100006481000066810000688100006a8100006c8100006e81000070810000728100007481000076810000788100007a8100007c8100007e81000080810000828100008481000086810000888100008a8100008c8100008e81000090810000928100009481000096810000988100009a8100009c8100009e810000a0810000a2810000a4810000a6810000a8810000aa810000ac810000ae810000b0810000b2810000b4810000b6810000b8810000ba810000bc810000be810000c0810000c2810000c4810000c6810000c8810000ca810000cc810000ce810000d0810000d2810000d4810000d6810000d8810000da810000dc810000de810000e0810000e2810000e4810000e6810000e8810000ea810000ec810000ee810000f0810000f2810000f4810000f6810000f8810000fa810000fc810000fe81000000820000028200000482000006820000088200000a8200000c8200000e82000010820000128200001482000016820000188200001a8200001c8200001e82000020820000228200002482000026820000288200002a8200002c8200002e82000030820000328200003482000036820000388200003a8200003c8200003e82000040820000428200004482000046820000488200004a8200004c8200004e82000050820000568200005a8200005c8200005e8200006282000070820000c6820000d2820000ec8200000a8400006a86000074860000768600007a8600007c860000ffffff7f
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name: UILoadUpdateWindow
m_OriginalName: UILoadUpdateWindow
m_Name: BuildParameter
m_OriginalName: BuildParameter
m_EditFieldRect:
serializedVersion: 2
x: 0
y: 0
width: 0
height: 0
m_UserData: 33176
m_UserData: 13586
m_IsWaitingForDelay: 0
m_IsRenaming: 0
m_OriginalEventType: 0
@ -1379,9 +1378,9 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 1206
x: 1242
y: 73
width: 713
width: 677
height: 926
m_SerializedDataModeController:
m_DataMode: 0