Search Issue Tracker
[SerializedField] fields produce "Field is never assigned to..." warning
1. Open the attached project (warning.zip)
2. Observe the warning in the console
Expected: field with SerializeField attribute do not produce the warning
Reproduced in 2018.3.0a1, 2018.3.0b1, 2018.3.0b2, 2019.1.0a1
Did not reproduce in 2018.2.8f1
Regression introduced in 2018.3.0a1
The new C# compiler is correct in reporting the additional warnings. Unfortunately, there is no magic to fix this.
You can disable the warnings with pragmas:
#pragma warning disable 0649
// your code
#pragma warning restore 0649
Or disable it globally by adding a csc.rsp file to your project and adding command line switch to disable the warning.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [Tile Map] Default cursor doesn't change to resize cursor on hovering over Default brush section in Tile Palette window
- After light bake, when light is switched from Baked to Realtime - it does not emit any light
- Multi-material list ordering does not respect DCC material ordering
- Timeline Track Clip locks to the Timeline cursor's position when moving it in the Timeline Asset
- [Particles] Infinite lifetime + prewarm causes errors