URP ScriptableRenderPass.Execute does not run in Unity 6: write RecordRenderGraph

In Unity 6 URP, a ScriptableRenderPass that only overrides Execute stops running once Compatibility Mode is gone. What to replace it with and where Unity's samples are.

Status
Removed or stopped working in Unity 6.0 · Rendering
Old
ScriptableRenderPass.Execute (Compatibility Mode)
New
ScriptableRenderPass.RecordRenderGraph
Checked
2026-10-05, against the sources below

What changed

URP 17, the version that ships with Unity 6, introduced the render graph system and made it the default. A custom render pass written for Unity 2022 overrides Execute and works with command buffers directly. Under render graph, URP calls RecordRenderGraph instead.

Unity first kept the old path behind Compatibility Mode, then hid it behind the URP_COMPATIBILITY_MODE define, and the URP upgrade guide now says that define has been removed too. A pass that only implements Execute shows an obsolete warning and does not run, which is why so many outline, blur and fog renderer features go silent after an upgrade.

The fix is a rewrite, not a rename: declare the textures you read and write in RecordRenderGraph and do the drawing in a render function. Unity ships complete examples under Samples > Universal Render Pipeline > URP RenderGraph Samples in the Package Manager.

Before and after

Before
C#
class OutlinePass : ScriptableRenderPass
{
    public override void Execute(ScriptableRenderContext context, ref RenderingData data)
    {
        var cmd = CommandBufferPool.Get("Outline");
        // ... draw ...
        context.ExecuteCommandBuffer(cmd);
        CommandBufferPool.Release(cmd);
    }
}
After
C#
class OutlinePass : ScriptableRenderPass
{
    class PassData { /* textures and settings the pass needs */ }

    public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData)
    {
        using (var builder = renderGraph.AddRasterRenderPass<PassData>("Outline", out var passData))
        {
            // declare reads and writes with builder, then:
            builder.SetRenderFunc((PassData data, RasterGraphContext ctx) =>
            {
                // ... draw with ctx.cmd ...
            });
        }
    }
}

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 checker

Questions

Can I switch render graph off to keep my old pass?
Not any more. The Compatibility Mode path that ran Execute has been hidden and then removed, so a pass that only implements Execute does not run in current Unity 6 versions. The pass has to implement RecordRenderGraph.
How do I see what my pass is doing under render graph?
Open Window > Analysis > Render Graph Viewer. It lists every pass in the frame with the textures each one reads and writes, which shows quickly whether your pass runs and what it touches. The Frame Debugger still shows the draw calls.

Sources

Related Unity 6 changes

Every Unity 6.x change, by version