Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: mathiassoeholm on March 12, 2014, 06:11:46 AM
-
Hello
I'm currently in the process of cleaning up the warnings in our Unity project.
I'm getting three warnings from NGUI, I'm on version 3.5.1.
Field 'UIToggle.radioButtonRoot' is never assigned to, and will always have its default value null UIToggle.cs 76
Field 'UISlider.foreground' is never assigned to, and will always have its default value null UISlider.cs 25
Field 'SpringPosition.eventReceiver' is never assigned to, and will always have its default value null SpringPosition.cs 57
-
Those are serialized fields, set by Unity. What version of Unity are you seeing that in?
-
I'm on version 4.3.4f1.
Actually the warnings only show up in the IDE and not in the Unity console, so it's just Visual Studio whining.
-
That's just resharper whining. Generally, for stuff like that it can be nice to initialize the field to null in code, since it removes the somewhat silly warning.
Visual studio is a little iffy on detecting whether or not things are set from the inspector.
-
Yup, it's Resharper!
Would be cool if the fields were explicitly initialized to null so Resharper would shut up :-)
But then again, it's only a Resharper problem..