How can I make the ALINE render in built-in mode without using URP?

  • PathFinder version: 5.3.1
  • Unity version: 22.3.55
  • Render pipeline: 14.0.11

How can I make the ALINE render in built-in mode without using URP?

I recently updated A* PathFinder, and the gizmo started rendering through URP.
The problem is that my game’s URP has a custom renderer, and since the ALINE gizmo is being rendered during the custom renderer’s intermediate timing, the gizmo does not display properly.

I tried removing all Version Defines related to URP in ALINE.asmdef, but it simply did not work.

Okay… I found a temporary workaround. Modify the script like this:

// AlineURPRenderPassFeature.cs: 18L
public override void Configure (CommandBuffer cmd, RenderTextureDescriptor cameraTextureDescriptor) {
    ConfigureTarget(k_CameraTarget);
}

// AlineURPRenderPassFeature.cs: 25L
public override void Execute (ScriptableRenderContext context, ref RenderingData renderingData) {
    var cmd = CommandBufferPool.Get();
    cmd.SetViewport(renderingData.cameraData.camera.pixelRect);
    context.ExecuteCommandBuffer(cmd);
    CommandBufferPool.Release(cmd);

    DrawingManager.instance.ExecuteCustomRenderPass(context, renderingData.cameraData.camera);
}

// AlineURPRenderPassFeature.cs: 75L
m_ScriptablePass.renderPassEvent = RenderPassEvent.AfterRendering + 8;
1 Like