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
{
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,8 +313,11 @@ namespace DCFApixels
RenderContextController.StaicContextController.Render(cbExecutor);
cbExecutor.Submit();
RenderContextController.StaicContextController.PostRender();
if(IsSRP)
{
RenderContextController.StaicContextController.RunEnd();
}
}
if (camera == null) { return; }
_currentCamera = camera;
@ -310,8 +326,11 @@ namespace DCFApixels
contextController.Render(cbExecutor);
cbExecutor.Submit();
contextController.PostRender();
if (IsSRP)
{
contextController.RunEnd();
}
}
#endregion