Skip to content

Commit 15dc399

Browse files
raquelpecesEvergreen
authored andcommitted
Modify Warning message about missing Depth for RenderTexture
The current Warning message when Depth is missing from RenderTexture is not helpful in identifying the source of the error and how to fix it. Updated this message for adding specific info about how to fix it. Jira ticket: [UUM-73172](https://jira.unity3d.com/browse/UUM-73172)
1 parent 4403a18 commit 15dc399

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Packages/com.unity.render-pipelines.universal/Runtime/2D/Rendergraph/Renderer2DRendergraph.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ ImportResourceSummary GetImportResourceSummary(RenderGraph renderGraph, Universa
119119
if (output.importInfoDepth.format == GraphicsFormat.None)
120120
{
121121
output.importInfoDepth.format = SystemInfo.GetGraphicsFormat(DefaultFormat.DepthStencil);
122-
Debug.LogWarning("Trying to render to a rendertexture without a depth buffer. URP+RG needs a depthbuffer to render.");
122+
Debug.LogWarning("In the render graph API, the output Render Texture must have a depth buffer. When you select a Render Texture in any camera's Output Texture property, the Depth Stencil Format property of the texture must be set to a value other than None.");
123123
}
124124
}
125125
else

Packages/com.unity.render-pipelines.universal/Runtime/UniversalRendererRenderGraph.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ void CreateRenderGraphCameraRenderTargets(RenderGraph renderGraph, bool isCamera
559559
if (importInfoDepth.format == GraphicsFormat.None)
560560
{
561561
importInfoDepth.format = SystemInfo.GetGraphicsFormat(DefaultFormat.DepthStencil);
562-
Debug.LogWarning("Trying to render to a rendertexture without a depth buffer. URP+RG needs a depthbuffer to render.");
562+
Debug.LogWarning("In the render graph API, the output Render Texture must have a depth buffer. When you select a Render Texture in any camera's Output Texture property, the Depth Stencil Format property of the texture must be set to a value other than None.");
563563
}
564564
}
565565

0 commit comments

Comments
 (0)