Warning cs0649 on Terminal lesson


I’m doing the terminal lesson on the unity course, and when I first did the lesson it worked fine, and out of nowhere I started getting this warnings on the code and I did nothing. I’m also getting a blue screen when I create a new project with no scripts at all.
What am I doing wrong and how can I fix it?

can you share a few more screenshots one of your game not in play mode on the game screen and one of the scene

Lloyd Risper

This is actually a side-effect of Unity upgrading the compiler it uses. The previous version of the compiler had no support for this and Unity has opted to keep the warning messages around, at least for now. There is nothing wrong, here. It’s just one of the many differences between the standard .NET world and Unity. These fields ([SerializeField] private) are things that are set in the Unity Inspector, which the compiler is unaware of, so it gives the very valid warning that the field is never set in your code. You can surpress the warnings, but I wouldn’t advise it. If Unity upgrades the compiler one more generation, there’s actually a built in functionality to intercept and handle these messages or include your own

This topic was automatically closed after 14 days. New replies are no longer allowed.

Privacy & Terms