URP SetupRenderPasses is deprecated in Unity 6.2
Unity 6.2 deprecated ScriptableRendererFeature.SetupRenderPasses. Move the work into AddRenderPasses with the render graph system.
- Status
- Obsolete since Unity 6.2 · Rendering
- Old
ScriptableRendererFeature.SetupRenderPasses- New
ScriptableRendererFeature.AddRenderPasses with render graph- Checked
- 2026-10-05, against the sources below
What changed
Renderer features used SetupRenderPasses to configure passes once the camera targets were known. Unity 6.2 deprecated it: with render graph, a pass reads the camera's targets from the frame data when it records, so the separate setup step is no longer needed.
Move any configuration into AddRenderPasses, and read targets inside the pass's RecordRenderGraph from frameData instead of storing RTHandles on the feature.
Before and after
Before
C#
public override void SetupRenderPasses(ScriptableRenderer renderer, in RenderingData data)
{
pass.Setup(renderer.cameraColorTargetHandle);
} After
C#
public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData data)
{
renderer.EnqueuePass(pass); // the pass reads the camera color from frameData itself
}Find every place it appears
This change needs a hand edit, but the Unity 6 Script Upgrade Checker points to every line it affects, together with the other changes for your target version.
Open this example in the checkerQuestions
- Does SetupRenderPasses still run in 6.2?
- It is deprecated, so it still compiles with a warning. Move the work now: the deprecation is the step before removal, and render graph passes do not need the setup step anyway.
- Where do I get the camera's color target inside a pass?
- In RecordRenderGraph, read it from the frame data:
var resources = frameData.Get<UniversalResourceData>();then useresources.activeColorTexture. You get a TextureHandle the render graph tracks for you.