From b81dd008894a0e17042669ee6767424504972e80 Mon Sep 17 00:00:00 2001 From: DCFApixels <99481254+DCFApixels@users.noreply.github.com> Date: Fri, 28 Feb 2025 15:04:07 +0800 Subject: [PATCH] test fix --- Runtime/DebugX.cs | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Runtime/DebugX.cs b/Runtime/DebugX.cs index 02e3d3e..9494ce3 100644 --- a/Runtime/DebugX.cs +++ b/Runtime/DebugX.cs @@ -19,6 +19,7 @@ using UnityEditor; namespace DCFApixels { using static DebugXConsts; + using static UnityEngine.PlayerLoop.PostLateUpdate; using IN = System.Runtime.CompilerServices.MethodImplAttribute; public static unsafe partial class DebugX { @@ -102,6 +103,11 @@ namespace DCFApixels system.updateDelegate -= PreRenderCallback; system.updateDelegate += PreRenderCallback; } + if (system.type == typeof(TriggerEndOfFrameCallbacks)) + { + system.updateDelegate -= OnTriggerEndOfFrameCallbacks; + system.updateDelegate += OnTriggerEndOfFrameCallbacks; + } } curentLoop.subSystemList = systemsList; PlayerLoop.SetPlayerLoop(curentLoop); @@ -273,6 +279,13 @@ namespace DCFApixels SetCameraContext(); _currentCamera = null; } + private static void OnTriggerEndOfFrameCallbacks() + { + foreach (var item in RenderContextController.AllConteollers) + { + item.RunEnd(); + } + } private static void EditorApplication_update() @@ -300,7 +313,10 @@ namespace DCFApixels RenderContextController.StaicContextController.Render(cbExecutor); cbExecutor.Submit(); RenderContextController.StaicContextController.PostRender(); - RenderContextController.StaicContextController.RunEnd(); + if(IsSRP) + { + RenderContextController.StaicContextController.RunEnd(); + } } if (camera == null) { return; } @@ -310,7 +326,10 @@ namespace DCFApixels contextController.Render(cbExecutor); cbExecutor.Submit(); contextController.PostRender(); - contextController.RunEnd(); + if (IsSRP) + { + contextController.RunEnd(); + } } #endregion