That’s almost entirely false. Even in the Windows-only .NET Framework, almost the whole API surface is platform agnostic. And modern .NET has been platform agnostic since 6-7 years.
But as an extra to the OP question, because the evolution of .NET and how Unity fits in that is indeed confusing, here is a quick summary :
The first thing to understand is that there are 3 main components to the .NET ecosystem :
- The programming language that gets compiled in the IL (Intermediate Language) code. For example, C#, F# or VB.NET
- The BCL (Base Class Library) : this is the “standard” API available to use though the C# language. This is where all the base building blocks are defined, for example stuff like int, string, List, Array…
- The JIT runtime (also referred as the CLR) : this is the execution engine, the thing that execute the IL code on your computer.
Things started with the .NET Framework about 20 years ago. The .NET Framework was initially a Windows only Microsoft product, which lead to an independent initiative to re-implement a cross-platform version of it, this is the Mono project.
For a long time, up to ~2015, both product evolved separately, with Mono providing compatibility for newer C# / .NET Framework versions :
- A re-implementation of the BCL where the various APIs were made to work on other OSes and platforms than Windows.
- A JIT runtime to run the IL code on other OSes and platforms than Windows.
Somewhere in that timeframe, Unity decides it want to integrate C# as a scripting engine and starts using Mono for that, a logical choice because of the multiplatform goals of Unity.
Then things got a bit complicated. Microsoft decided to make its own cross-platform version of the .NET framework. This was named .NET Core. While this new product started evolving, the windows-only .NET Framework continued to be a separate product, and Mono too.
There was now 3 separate products for the same ecosystem, which lead to the creation of .NET Standard, a standardization of the cross-platform BCL APIs that all products should cover. This was essential because the .NET ecosystem heavily relies on a huge collection of libraries (ie, additional APIs provided by various people). Without that standardization, all those libraries would have required separate versions for each of the 3 products. That’s how we got .NET Standard 1.0, which was implemented by .NET Framework 4.5, .Net Core 1.0 and Mono.
Around 2015, Mono is bought by Microsoft which fully open source it, the .NET Foundation is founded, and most .NET things owned by Microsoft are put under its umbrella and fully open-sourced. Over time, focus is shifted towards .NET Core, which rapidly becomes a much more stable and mature product than the two others. In 2020, .NET Core is renamed to just .NET with the introduction of .NET 5.
As of now .NET Framework is essentially abandoned, and Mono is slowly becoming less and less relevant because it’s main point was cross-platform compatibility, which is now provided by the main .NET product, and because it’s lagging behind in terms of features and performance. In that context, Unity has announced that it is working toward moving away from Mono.