Skip to content

Configure URP for Tick UI

Configure the URP integration so Tick UI's draw commands land in the correct render pass with the correct ordering. This page covers the URP-specific configuration beyond the basic Inspector setup shown in Set up Tick UI.

This page assumes you have already installed Tick UI and completed the basic setup.

To configure URP for Tick UI

  1. Confirm TICK_URP is defined. Open Project Settings > Player > Other Settings and check Scripting Define Symbols for the active platform. The .asmdef sets the define automatically when the URP package is present, but mixed-pipeline projects sometimes need it set manually.
  2. Attach TickURPInjector to the GameObject that holds your BaseGameUI subclass. The injector hooks RenderPipelineManager.beginCameraRendering globally, so it does not need to live on the camera. It finds the recorder via GetComponent<TickRecorder>() on the same GameObject, so the two components must share a host.
  3. Choose the Render Pass Event that matches your usage. The default AfterRendering puts Tick UI on top of the world, including post-processing. Earlier events apply post-process to the UI.

Choose the Render Pass Event

RenderPassEvent controls when Tick UI's pass runs relative to the rest of URP's frame. Common choices:

Event Effect
AfterRendering (default) UI draws on top of everything, including post-processing. Best for HUDs.
BeforeRenderingPostProcessing UI draws into the colour target before post. Bloom and tone-mapping affect the UI.
AfterRenderingTransparents UI draws on top of opaque and transparent geometry but before post.

Most projects keep the default. Adjust only when post-processing needs to apply to the UI, or when you need the UI to render before a custom post-process feature.

Camera-target combinations

TickURPInjector enqueues the pass on every Game-type camera. If your project uses several cameras (a world camera plus a UI camera, for example), be deliberate about where the injector lives:

  • Single camera, default setup. The injector runs on the one camera. Nothing extra to configure.
  • World camera + UI camera. Place the injector on whichever camera should render the UI. Enqueueing on both renders the UI twice.
  • Camera renders to a RenderTexture. The injector runs and writes into the texture. It forwards the camera target descriptor's pixel dimensions to the drawer each frame, so the pixel-to-NDC math matches the texture and the UI positions correctly even when the texture differs from the screen size. Refer to Render pipelines.

Troubleshooting

Nothing renders. : TICK_URP is missing, or no TickRecorder component sits on the injector's GameObject. Check both. The injector finds the recorder via GetComponent<TickRecorder>() and silently no-ops when none is present.

UI draws at the wrong scale. : The shipped injector forwards the camera target descriptor's pixel dimensions each frame, so render scale ≠ 1.0, a custom camera target, and viewport-rect cameras all position correctly. If the scale is still wrong, confirm TickURPInjector is the unmodified shipped component and not a custom integration that skips SetRenderTarget. Refer to Render pipelines.

UI renders twice. : TickURPInjector is enqueueing the pass on more than one Game camera. Move the injector to a single GameObject and confirm only one is enabled.

Scissor is wrong, or scissor leaks across frames. : The clip stack is unbalanced inside DoUI. Run with the TICK_DEBUGGER define and check for stack-leak asserts at end of frame. For the contract, refer to Stacks.

Additional resources