0
\$\begingroup\$

I'm experimenting with URP, Render Pipelines, and Shaders for the first time recently and have noticed something odd. In the scene I'm building, Point Lights and Spotlights don't work. No matter what I do, they do not affect the environment at all, for static and nonstatic objects. I can't even use a Halo component to visualize them. They exist in the scene but don't do anything and even Lightmaps don't seem to register them.

I suspect that it's because of the render pipeline, but if I go to a blank scene and put a spotlight on an object, it works. I'm just very confused what's happening.

Any idea what might be happening?

\$\endgroup\$
1
  • \$\begingroup\$ I'm not able to reproduce this. Adding a new point light or spotlight into a URP scene is showing illumination as expected. Do you experience this when you create a new project with the URP template? If not, try retracing the steps you took with your existing project, until the lights stop working in the new one - that will help us narrow down where potential causes might be hiding. \$\endgroup\$
    – DMGregory
    Jun 16, 2020 at 12:57

2 Answers 2

1
\$\begingroup\$

As suggested in the comments, clearing Unity's preferences cache made the issue go away.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Please add those relevant comments here as it seems you will be picking this as an answer and comments might get removed later on. \$\endgroup\$ Dec 7, 2020 at 7:32
0
\$\begingroup\$

Not sure if this is the same problem, but I've had a similar issue before on 2019.3.0 (lights work in new scenes but not in original; although I was working with 2D lights) and deleting and replacing the camera on the scene somehow worked.

I think URP makes changes to the camera component, but they don't get updated in your scenes?

\$\endgroup\$
2
  • 2
    \$\begingroup\$ This wasn't the cause, but gave me an idea... I went into Unity's preferences and cleared the cache. Then it worked. :) \$\endgroup\$
    – JSparks
    Jun 23, 2020 at 11:30
  • 1
    \$\begingroup\$ @JSparks nice! I think people tell you to write an answer to your own question and accept it in that case. Maybe someone would find it useful later on. \$\endgroup\$
    – qwyxivi
    Jun 23, 2020 at 17:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .