While trying to convert my Unity project to use URP, textures render in scene view but not game view

199 views Asked by At

Ive been working on a Unity project and we have recently realized we should be using the Universal Render Pipeline (URP) instead of HDRP. I've been trying to find a way to make the switch. However, when I switch to use URP, I can't get any textures to render in game for existing scenes. The textures do appear in the scene view, it's only in game mode that they disappear.

I've been tinkering with this for a while, and still haven't learned much, but I'll provide what I can.

  • My understanding is that my old shaders can't be used in URP. I'm okay with needing recreate them, but it doesn't fix the issue.
  • When I create a brand new scene, objects do render in game. Makes me think it has something to do with the camera or scene, but I'm not sure what.
  • Objects DO render in the camera preview in the scene view.
  • UI elements, eg timer and points, are still rendered. Only the 3D objects are missing.
  • The items I'm testing are using a basic material that uses the 'Universal Render Pipeline/Lit' shader with no changes.
  • I have added a URP asset and made sure to select it in my graphics settings

Scene View: Objects are visible in the scene view, and the camera preview

Game View: In game view none of the objects render. UI elements still work though.

Let me know if there is any more useful info I can provide. SO wanted to mark it as spam so I had cut some of my info out. Thanks!

EDIT: I have determined that the problem involves having multiple cameras in the scene. A camera for the UI is culling all the other stuff. Looking into how to fix this now...

1

There are 1 answers

0
Scotti On BEST ANSWER

Okay, I solved it. Turns out that having multiple cameras in a scene works differently with URP. I could solve the problem by disabling the additional camera, which was essentially overriding the main camera. Instead, looks like I need to stack cameras so they can render into the same output.