Since recent editor versions, in Player settings there is now Player > Other Settings > Configuration > Api Compatibility Level* with no real explanation in the editor or the docs what the difference between .NET Standard 2.1 and .NET Framework is for projects?
Just looking for a black-and-white answer to this if anyone has any tips?
Thanks for the link, but my fundamental question about the difference between the two settings remains unanswered (already made a ducumentation improvement request):
Especially the “Cross-platform compatibility” section is very vague! While it states, that we should use .NET Standard for cross-platform development, the next few sentences make it sound like it’s a bad idea:
some platforms don’t fully support the .NET Standard
.NET Framework profile includes all APIs in the .NET Standard profile
[.NET Framework includes] additional APIs, some of which might work on few or no platforms.
When toggling the switch on an existing project (from Framework → Standard), I’d like to know if I might break some features somewhere. Will I get compiler warnings for unsupported features or will they just silently malfunction or crash in builds?
What it’s trying to say is that there is stuff in .NET Standard that will not work on all platforms (such as System.Reflection.Emit on IL2CPP or threads on WebGL). .NET Framework just adds more stuff that is more hit & miss. So if you stick with .NET Standard, you are less likely to run into things that don’t work.
You will get compiler errors. That setting only affects how your scripts are compiled.