From ef7f4c49a827ed9c29a574f95847c23d3de17efee5656fc556255570b1992aae Mon Sep 17 00:00:00 2001 From: copecone Date: Thu, 28 May 2026 12:03:24 +0900 Subject: [PATCH] Move UI Components from `Component` Package to `UI` Package --- Component/RenderManager.cs | 1 + Patch/ClassPatch/EndscreenLanternsPatch.cs | 19 +++++++++---------- UI/DebugMonitorUI.cs | 3 ++- UI/EscapeHandlerUI.cs | 3 ++- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Component/RenderManager.cs b/Component/RenderManager.cs index a72758d..42203df 100644 --- a/Component/RenderManager.cs +++ b/Component/RenderManager.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.IO; using System.Threading; +using ADOFAIRenderer.UI; using ADOFAIRenderer.Util; using ADOFAIRenderer.Util.FFmpeg; using MelonLoader; diff --git a/Patch/ClassPatch/EndscreenLanternsPatch.cs b/Patch/ClassPatch/EndscreenLanternsPatch.cs index 1bc1bc4..d8a286b 100644 --- a/Patch/ClassPatch/EndscreenLanternsPatch.cs +++ b/Patch/ClassPatch/EndscreenLanternsPatch.cs @@ -56,18 +56,17 @@ namespace ADOFAIRenderer.Patch.ClassPatch var chainSequenceField = traverse.Field("chainSequence"); var chainSequenceObj = chainSequenceField.GetValue(); if (chainSequenceObj == null) return; + + try { - try - { - var killMethod = chainSequenceObj.GetType().GetMethod("Kill", new[] { typeof(bool) }); - killMethod?.Invoke(chainSequenceObj, new object[] { false }); - } - catch - { - // Ignore reflection errors - } - chainSequenceField.SetValue(null); + var killMethod = chainSequenceObj.GetType().GetMethod("Kill", new[] { typeof(bool) }); + killMethod?.Invoke(chainSequenceObj, new object[] { false }); } + catch + { + // Ignore reflection errors + } + chainSequenceField.SetValue(null); } } } diff --git a/UI/DebugMonitorUI.cs b/UI/DebugMonitorUI.cs index 97f50c0..18f3504 100644 --- a/UI/DebugMonitorUI.cs +++ b/UI/DebugMonitorUI.cs @@ -1,10 +1,11 @@ using System; using System.Text; +using ADOFAIRenderer.Component; using TMPro; using UnityEngine; using UnityEngine.UI; -namespace ADOFAIRenderer.Component +namespace ADOFAIRenderer.UI { public class DebugMonitorUI : MonoBehaviour { diff --git a/UI/EscapeHandlerUI.cs b/UI/EscapeHandlerUI.cs index 02331d4..2feef43 100644 --- a/UI/EscapeHandlerUI.cs +++ b/UI/EscapeHandlerUI.cs @@ -1,9 +1,10 @@ using System.Diagnostics; +using ADOFAIRenderer.Component; using TMPro; using UnityEngine; using UnityEngine.UI; -namespace ADOFAIRenderer.Component +namespace ADOFAIRenderer.UI { public class EscapeHandlerUI : MonoBehaviour {