This commit is contained in:
DCFApixels 2025-02-28 15:04:07 +08:00
parent 2baffd78eb
commit b81dd00889

View File

@ -19,6 +19,7 @@ using UnityEditor;
namespace DCFApixels namespace DCFApixels
{ {
using static DebugXConsts; using static DebugXConsts;
using static UnityEngine.PlayerLoop.PostLateUpdate;
using IN = System.Runtime.CompilerServices.MethodImplAttribute; using IN = System.Runtime.CompilerServices.MethodImplAttribute;
public static unsafe partial class DebugX public static unsafe partial class DebugX
{ {
@ -102,6 +103,11 @@ namespace DCFApixels
system.updateDelegate -= PreRenderCallback; system.updateDelegate -= PreRenderCallback;
system.updateDelegate += PreRenderCallback; system.updateDelegate += PreRenderCallback;
} }
if (system.type == typeof(TriggerEndOfFrameCallbacks))
{
system.updateDelegate -= OnTriggerEndOfFrameCallbacks;
system.updateDelegate += OnTriggerEndOfFrameCallbacks;
}
} }
curentLoop.subSystemList = systemsList; curentLoop.subSystemList = systemsList;
PlayerLoop.SetPlayerLoop(curentLoop); PlayerLoop.SetPlayerLoop(curentLoop);
@ -273,6 +279,13 @@ namespace DCFApixels
SetCameraContext(); SetCameraContext();
_currentCamera = null; _currentCamera = null;
} }
private static void OnTriggerEndOfFrameCallbacks()
{
foreach (var item in RenderContextController.AllConteollers)
{
item.RunEnd();
}
}
private static void EditorApplication_update() private static void EditorApplication_update()
@ -300,8 +313,11 @@ namespace DCFApixels
RenderContextController.StaicContextController.Render(cbExecutor); RenderContextController.StaicContextController.Render(cbExecutor);
cbExecutor.Submit(); cbExecutor.Submit();
RenderContextController.StaicContextController.PostRender(); RenderContextController.StaicContextController.PostRender();
if(IsSRP)
{
RenderContextController.StaicContextController.RunEnd(); RenderContextController.StaicContextController.RunEnd();
} }
}
if (camera == null) { return; } if (camera == null) { return; }
_currentCamera = camera; _currentCamera = camera;
@ -310,8 +326,11 @@ namespace DCFApixels
contextController.Render(cbExecutor); contextController.Render(cbExecutor);
cbExecutor.Submit(); cbExecutor.Submit();
contextController.PostRender(); contextController.PostRender();
if (IsSRP)
{
contextController.RunEnd(); contextController.RunEnd();
} }
}
#endregion #endregion