Normal Maps Quality gets set to "Disabled" on game load.

So, I’ve been trying to find some information on this, and I’ve been messing around with all sorts of settings for the last day and I couldn’t figure this one out:

I have this character I put in the game which has a “Light 2D” component attached. I’ve saved the “NormalMaps: Quality” to “accurate”, and reloaded the prefab to the game, but every time I run the game it automatically returns the NormalMaps quality of the light back to “Disabled”. I can manually activate it during the gameplay through inspector window, and the normal maps are working fine… Just can’t figure why the game is returning this setting to default on load, and it’s annoying the heck out of me. Any pointers?

1 Like

Any news?
I have the exact same Problem.

Hi,
Did anybody manage to solve this?

Thanks for reporting this issue. I’ve managed to reproduce the bug and will be looking into it.

1 Like

Aaaaahm… I dunno if it is about a bug or not, but I found something at:

C:\Program Files\Unity\Hub\Editor\2021.1.3f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.render-pipelines.universal\Runtime\2D\Light2D.cs

There’s a boolean serialized field that is set to false:

[SerializeField] bool m_UseNormalMap = false; // This is now deprecated. Keep it here for backwards compatibility.

And then, in Awake() we have this:

if (!m_UseNormalMap && m_NormalMapQuality != NormalMapQuality.Disabled)
m_NormalMapQuality = NormalMapQuality.Disabled;

So we have that NormalMapQuality is always set to Disabled. As I said, I dunno if it is a bug, but I found no solution anywhere, no answers in forums and I needed this working, so I changed the initial value from false to true in the Light2D.cs file (I had to grant write permissions to do it), I started my project and I replaced all my spot 2d lights with new instances. Result: working.

2 Likes

Yes, I have traced it back to that code as well. While the fix may be obvious, I need to investigate further to find out why it was setup that way to ensure it doesn’t cause instability.

Glad you found a workaround, thanks for your patience.

2 Likes

Indeed, I know that the most obvious fix it a potential dangerous issue without the proper investigation. Thanks for your support.

1 Like

Hi, I wanted to update you that the issue has been addressed and will be going out in the next version.

1 Like

Thank you very much, Kennyy_