What .Net version is Unity 4.1 using?

There are old questions and forum thread about this, but they are, well, old.

Are we still at .Net 3.5?

~ce

graham$ cd /Applications/Unity/Unity.app/Contents/Frameworks/MonoBleedingEdge/bin
graham$ ./mono -V
Mono JIT compiler version 2.10.2 (tarball Fri Nov 2 22:02:08 CET 2012)
Copyright (C) 2002-2011 Novell, Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: normal
Notification: kqueue
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC)

This is Unity 4.1.2. So, looks like Unity uses Mono 2.10.2, which Wikipedia suggests is equivalent to c# 4.0. This does not mean everything you can do in c# 4.0 you can do in Unity.

C:\Program Files\Unity4_20\Editor\Data\Mono\bin>mono -V


Mono JIT compiler version 2.0 (Visual Studio built mono)

Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
TLS: normal
GC: Included Boehm (with typed GC)
SIGSEGV: normal
Notification: Thread + polling
Architecture: x86
Disabled: none


The CLR version according to System.Environment.Version printed in Unity3D 4.3.0f4 is 2.0.50727.1433. This would suggest at most .Net 3.5 since .Net 4.0 is based on CLR 4.

What is odd however is that:

  • named parameters and optional arguments are available which are a .c# 4.0 featureā€¦
  • covariance is not available which is also a c# 4.0 featureā€¦