From 36cf4a1385abfafdf79f3fa4ef74edc4a0f56357 Mon Sep 17 00:00:00 2001 From: xeon_lagunas Date: Mon, 13 May 2024 15:40:04 +0900 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E3=81=97=E3=81=84=E3=83=90=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=83=A7=E3=83=B3=E3=81=AEUnity=E3=81=A7=E5=89=8A?= =?UTF-8?q?=E9=99=A4=E3=81=95=E3=82=8C=E3=81=9F=E3=83=97=E3=83=AD=E3=83=91?= =?UTF-8?q?=E3=83=86=E3=82=A3=E3=82=92=E5=8F=82=E7=85=A7=E3=81=97=E3=81=A6?= =?UTF-8?q?=E3=81=84=E3=81=9F=E3=83=90=E3=82=B0=E3=81=AE=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../External/URP/EffekseerURPRenderPassFeature.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Dev/Plugin/Assets/Effekseer/External/URP/EffekseerURPRenderPassFeature.cs b/Dev/Plugin/Assets/Effekseer/External/URP/EffekseerURPRenderPassFeature.cs index 8857bf3..6ade4a0 100644 --- a/Dev/Plugin/Assets/Effekseer/External/URP/EffekseerURPRenderPassFeature.cs +++ b/Dev/Plugin/Assets/Effekseer/External/URP/EffekseerURPRenderPassFeature.cs @@ -106,16 +106,25 @@ public override void Execute(ScriptableRenderContext context, ref UnityEngine.Re if (Effekseer.EffekseerSystem.Instance == null) return; #if EFFEKSEER_URP_DEPTHTARGET_FIX var renderer = renderingData.cameraData.renderer; +#if UNITY_2022_3_OR_NEWER + prop.colorTargetIdentifier = renderer.cameraColorTargetHandle; +#else prop.colorTargetIdentifier = renderer.cameraColorTarget; +#endif // NOTE: We need to know whether the depth in cameraDepthTarget is valid or not since if it is valid, // we need to pass cameraDepthTarget to SetRenderTarget() later on. If it isn't valid, the depth in // cameraColorTarget is used instead. - var isValidDepth = IsValidCameraDepthTarget(renderer.cameraDepthTarget); +#if UNITY_2022_3_OR_NEWER + var cameraDepthTarget = renderer.cameraDepthTargetHandle; +#else + var cameraDepthTarget = renderer.cameraDepthTarget; +#endif + var isValidDepth = IsValidCameraDepthTarget(cameraDepthTarget); if (isValidDepth) { - prop.depthTargetIdentifier = renderer.cameraDepthTarget; + prop.depthTargetIdentifier = cameraDepthTarget; } else {