Search Unity

ApiCompatibilityLevel comparison missing?

Discussion in 'Scripting' started by Wolfram, Aug 8, 2017.

  1. Wolfram

    Wolfram

    Joined:
    Feb 16, 2010
    Posts:
    261
    Hiho!

    I am missing a comparison between the different .NET compatibility levels that can be set in the PlayerSettings. Previously there was a great overview for this at:
    https://docs.unity3d.com/401/Documentation/ScriptReference/MonoCompatibility.html
    But this page is ancient (=available only for Unity <=4.x), and with the introduction of .NET 4.6 it's no longer current. Also, it is incomplete, as for example System.IO.Ports is missing (which is for example available in .NET 2.0, but not in .NET 2.0 subset).

    So is there a better comparison for these, for the currently possible settings 2.0, 2.0 subset, 4.6, Web/SamsungTV, and Micro (as per https://docs.unity3d.com/ScriptReference/ApiCompatibilityLevel.html )?
    A per-member overview is probably unnecessary, a by-class overview would suffice.

    The reason I'm asking is, we're trying to keep our script base framework compatible between different projects AND platforms, without having to edit them each time, and we're using preprocessor defines for that (=our own defines, such as "USE_DOTNET20", as well as Unity defines, such as UNITY_STANDALONE, UNITY_IOS, and so on).

    Or from a different perspective, my actual problem at the moment is that I'd like to know for which platform and API settings combination the namespace System.IO.Ports is available.

    Thanks! :cool:
    Wolfram