Fix Single Frame Delay in Capture

This commit is contained in:
copecone committed 2026-08-11 03:24:28 +09:00
1 parent da8fcd0190
commit 9ff7632f04
2 files changed
+10 -2

No files matched your search

+9 -1
View File
@@ -1,3 +1,4 @@
using System.Collections;
using System.Reflection;
using HarmonyLib;
using UnityEngine;
@@ -16,10 +17,17 @@ namespace ADOFAIRenderer.Core
private void LateUpdate()
{
StartCoroutine(PostFrameCoroutine());
}
private IEnumerator PostFrameCoroutine()
{
yield return new WaitForEndOfFrame();
var val = (MeshRenderer)_camQuadMeshField!.GetValue(scrCamera.instance);
if (RenderManager.Instance)
{
RenderManager.Instance.OnPostRender(val.material.mainTexture as RenderTexture);
RenderManager.Instance.OnPostFrame(val.sharedMaterial.mainTexture as RenderTexture);
}
}
}