Blog of


Unity’s Mono maniacs

Be sure of one thing: I love Unity and cannot let a day end without doing something with it^^.
But: there's a but.
I'm very disappointed about the transparency regarding its mono version, integration and... modification.
Everything in Unity is well documented, tutorialized, blogged and tweeted... everything but Mono !

What are we talking about exactly ?

Unity is using the C# language, but it stand on top of a modified version of Mono 2.6 .
Mono ( is a framework : a utility toolkit that extends the language/compiler by high-abstraction primitives, like List, Dictionaries, garbage collector, Self-Introspection.
Mono was made as an open-source alternative to the .NET Framework, made by Microsoft (which also became open-source recently ! sources here )
You can see Mono as the foundation of Unity's kernel, and its secret recipe for its huge portability.

So, I have one request and one only:

As Unity provides its manual documentation : $INSTALLPATH/Unity/Editor/Data/Documentation/en/Manual/index.html
... and its API documentation : $INSTALLPATH/Unity/Editor/Data/Documentation/en/ScriptReference/index.html
Why do you not provide your framework documentation ?
I'm quite sure 90% of Unity users uses MSDN website when working on their games.
But think about it; That's like reading MS Word's help when using LibreOffice right ?

So you can find documentation of classes or methods that are not available in unity, especially when integrating other c# library, external to unity.
I found myself unable to use the namespace "System.Threading.Tasks", System.Drawing.Image or also all LINQ-relative syntax that are not available also.

What can we know ?

So, "Internet" says Unity runs a modified Mono 2.6, but from my own very very old post here :
I tried to get dynamically the Mono version, and that is a mess :

#$INSTALLPATH\Unity\Editor\Data\Mono\bin\mono.exe" -V
>Mono JIT compiler version 2.0 (Visual Studio built mono)
>Copyright (C) 2002-2010 Novell, Inc and Contributors.
>TLS: normal
>GC: Included Boehm (with typed GC)
>SIGSEGV: normal Notification: Thread + polling
>Architecture: x86
>Disabled: none

To be more precise :

#$INSTALLPATH\Unity\Editor\Data\Mono\bin>monop2 --runtime-version mono.exe
>runtime version: 2.0.50727.1433

In script you can also :

//you will need "using System.Reflection;" in your file header
System.Type type = System.Type.GetType("Mono.Runtime");
if (type != null) {
System.Reflection.MethodInfo displayName = type.GetMethod("GetDisplayName", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static);
if (displayName != null)
    Debug.Log(displayName.Invoke(null, null)); // On Unity5.0 it printed "2.0 (Visual Studio built mono)"

Worse a dedicated "Mono Compatibility page" has disappeared since 4.1.2 : => page not found !
Apparently, the modified version of Mono is open-source, but the github link seems quite frozen to me...
So please, help us at least find the real and correct documentation of our everyday framework !

By the way, taken how things move fast :

I know the biggest feature in Unity is its huge portability, and it was named from that, but maybe we can improve our workflow by following the two main directions of .NET and Mono ?
When you looked at the history of Mono releasesĀ  (Yes Mono 2.6 is dated from 2009) and the Microsoft's ones (.NET 4.0 and .NET 4.5 ) there is great features and Unity could benefits from them.
(To follow the equivalent rule between these twos, Let's say Mono 2.6 is equivalent to C# 3.0 (in terms of language features). Mono 2.6.1 started adding .NET 4.0 features).
But what about the "modified version" Unity uses ?
Did it evolves along side of the Editor ?
Maybe I'm wrong, and if this kind of documentation exists, I will beĀ  very thankful to anyone who can link it to me !
But if not, please please provides us something to work with ^^.

Comments (0) Trackbacks (0)

No comments yet.

Leave a comment

No trackbacks yet.