Cannot alter Light2D programmatically

I’m desperately trying to change the intensity of a light programmatically.

However the namespace UnityEngine.Experimental.Rendering.Universal or UnityEngine.Rendering.Universal won’t resolve and I have no idea why ; therefore I can’t work with a Light2D object…

I’m using Unity 2020.3.36f1 (updated to that version after having the issue with .3.26 but nothing changed). The lights are working perfectly, but I just can’t “touch” them via a script.

What could I do ? I’m stuck on that issue for more than 1 hour now ;O

I managed to do it by coding “blindly” (the IDE does not recognize the namespace but I know it’s there) ; having the same issue with TMPro and never managed to fix that… It’s working but not practical to code like this with the IDE not knowing about the namespace…

This may help you with intellisense and possibly other Visual Studio integration problems:

Sometimes the fix is as simple as doing Assets → Open C# Project from Unity. Other times it requires more.

Other times it requires you also nuke the userprefs and .vsconfig and other crufty low-value high-hassle files that Visual Studio tends to slowly damage over time, then try the above trick.

Barring all that, move on to other ideas:

https://discussions.unity.com/t/778503

Also, try update the VSCode package inside of Unity: Window → Package Manager → Search for Visual Studio Code Editor → Press the Update button

Also, this: https://discussions.unity.com/t/805330/7

Tried absolutely everything but nothing worked :confused: Actually it’s now even worse as I get additional Messages which are mostly redundant :frowning: