I have just read this “old” blog The future of scripting in Unity | Unity Blog telling us that the .net version will be updated.
So is Unity 5 uses a .net 4+ version?
You can run this to check the version
Debug.Log(System.Enviroment.Version);
Im using 5.3.4f1 and it is .Net 2.0.50727.1433
according to Debug.Log(System.Environment.Version);
You can use some reflection to find out:
using System.Reflection;
Type type = Type.GetType("Mono.Runtime");
if (type != null)
{
MethodInfo displayName = type.GetMethod("GetDisplayName", BindingFlags.NonPublic | BindingFlags.Static);
if (displayName != null)
Debug.Log(displayName.Invoke(null, null));
}
It prints out:
I’m using 5.0.0f4 and it is still .Net 2.0