Using .NET API 2.0 compatibility level
Manual     Reference     Scripting   
Unity Manual > Getting Started with iOS Development > iOS Scripting > Using .NET API 2.0 compatibility level

Using .NET API 2.0 compatibility level

Android

Unity Android supports two .NET API compatibility levels: .NET 2.0 and a subset of .NET 2.0 You can select the appropriate level in PlayerSettings.

.NET API 2.0

Unity Android targets supports the .NET 2.0 API profile; It is close to the full .NET 2.0 API and offers best compatibility with pre-existing .NET code.

Pros:

  1. Better code compatibility with desktop Unity and third party libraries
  2. More features in standard the API set

Cons:

  1. Application build size is bigger
  2. Slightly worse application startup time

Note: Unity Android does not support namespaces in the scripts. If you have third party library with the source, then the best practice is to compile this library outside Unity Android Editor and drop library .dll file into Assets folder.

.NET 2.0 Subset

Unity Android targets also support the .NET 2.0 Subset API profile. It is closest to the Mono "monotouch" profile, so many limitations that are applicable to the "monotouch" profile are also applicable for Unity Android implementation of this .NET profile. More information on "monotouch" profile limitations can be found here.

Pros:

  1. Smaller application distribution size especially when stripping is not used

Cons:

  1. Worse compatibility with standard and third party libraries

Page last updated: 2011-02-24