Pink materials in FPS HUD sample in URP

  • updated
  • Under Review

When I open the FPS HUD sample in URP, there are pink materials in the scene.

Tested in 2019.4.11, 2020.1.6, 2020.2.0b2.

Reporting a bug? please specify Unity version:
2019.4.11f1 URP 7.5, 2020.1.6f1 URP 8.2, 2020.2.0b2 URP 8.1.
Reporting a bug? please specify Shapes version:
2.3.1
Freya Holmér
  • Under Review

are you using the experimental 2D render pipeline?

Oleksandr Kokoshyn

I'm using ForwardRenderer.

I'm following this scenario:

1. Create a new project with URP template.

2. Import Shapes.

3. Shapes shows the "Generate URP shaders" dialog, I click Yes.

4. Open the FPS HUD scene.

5. Most (or maybe all) materials have the Standard shader assigned.

6. When I run the command "Upgrade project materials to Universal RP materials", Unity changes the Standard shader to URP Lit shader (it does this on all GameObjects except for Player), and writes a bunch of info messages to console about the Shapes shaders not being supported.

After switching the Standard shader to URP Lit shader, I can see the objects, but they are very dark, even after baking the lighting.

Freya Holmér

I'm not sure I will fix this, this is mostly a frustration I have with how Unity handles render pipelines in general, there's no good way to make a scene with materials that work across all render pipelines without this import process :c

I guess the "solution" is to bundle the example scenes into three separate .unitypackages (built-in RP, URP, HDRP), but this in and of itself means every time I want to update the example scene I have to extract and update all three cases and then re-pack them, which adds a lot of friction for whenever I want to update something

I might be able to make the materials be generated on the fly instead of existing as assets, but it's very low priority for now