Legacy Documentation: Version 2018.1 (Go to current version)
Referencing additional class library assemblies
Generic Functions
Other Versions

Stable scripting runtime: known limitations

Unity supports a modern .NET runtime. You may encounter the following issues when using the .NET runtime:

Code size

The stable scripting runtime comes with a larger .NET class library API than the legacy scripting runtime. This means the code size is frequently larger. This size increase may be significant, especially on size-constrained and Ahead-of-Time (AOT) platforms.

To mitigate code size increases:

  1. Choose the smallest .NET profile possible (see .NET profile support). The .NET Standard 2.0 profile is about half the size of the .NET 4.x profile, so use the .NET Standard 2.0 profile where possible.
  2. Enable Strip Engine Code in the Unity Editor Player Settings (go to Edit > Project Settings > Player). This option statically analyzes the managed code in the Project, and removes any unused code. Note: This option is only available with the IL2CPP scripting backend.

Transport Layer Security (TLS)

Modern Mono has TLS 1.2 support for a number of platforms. Unity supports TLS 1.0 in the .NET class libraries, and TLS only works for the Mac Standalone player. Where you require full TLS support, use UnityWebRequest or platform-specific native solutions. Unity is actively working on adding TLS 1.2 support for all .NET class library APIs on all platforms that Unity supports.


Did you find this page useful? Please give it a rating:

Referencing additional class library assemblies
Generic Functions