Why does Unity need new Mono?

In the Unity 5 announcement thread a lot of people are complaining that Unity 5 does not have new Mono.

But why do we need new Mono?

I understand that Mono is sort of the back bone of the Unity code engine, and apparently we are using an outdated version of Mono? What is it in the new versions that we are missing and how would it change how Unity coding works?

Also if it is so important what might be the reason we are not seeing these changes in Unity 5?

Because it’s slow as hell, suffers from severe GC performance issues, and not even feature complete for the version we have. Working around Mono’s limitations in Unity makes mid-sized projects on mobile and larger projects on PC/Mac ridiculously cumbersome in a lot of cases.

I see, so it’s more of a performance issue? Would it also give us more libraries to work with?

Potentially, as it would mean that more stuff written for .NET would be compatible with Unity.

It’s sad to see Xamarin moaning/bitching about their licenses. I think it’s time for Unity to become mono independant and look for other solutions.
Maybe C++/CLI with their own managed unity objects so entry level programmers don’t have to mess around with their memory and let more advanced users manage whatever they want?
I really like C# (and it was the main reason i chose Unity) but frankly .net2.0 start to date, there’s a lot of very nice features in more recent .net versions + the fact that the current mono implementation is slow compared to the latest one. -_-

Are they moaning and bitching about their licenses?

On their site they claim they’re happy to sell a commercial license instead of the LGPLv2 license Xamarin what’s the actual difficulty here? The acquisition of a suitable license or updating the integration itself?

If there’s no new mono in Unity then it’s a license issue and Xamarin doesn’t look like they want to cooperate or do any custom licensing with Unity, they simply don’t care. Otherwise we wouldn’t have this discussion right? ^^

Yep, all of the above basically.

We’re currently working on a very old implementation. This affects performance, especially garbage collection, but also which libraries are available to us and what language features are supported. C# and .NET have been constantly evolving over the years and with time it starts to really show that we’re stuck with an old version which requires more optimisation and more hacking around features, that actually are implemented as part of the language/frameworks already.

Indeed. The fact that we got a nice high level, managed language to use in Unity is extremely convenient and a huge draw in my opinion. I don’t think the engine would be as popular if there was only UnityScript for example. But, as you said, something needs to happen. They seem to be working on it, so let’s hope they really manage to find a solution based on C#, because at the end of the day it is a nice language with nice libraries. I’ve been joking around in the other thread last night, saying that it would have probably been better to go with Java in the first place. Ironically, this might turn out as true, more or less.

Mmmh, however C++ would come with its own problems. I don’t think we should encourage keeping that language around much longer for anything that is not systems programming. Just imagine implementing multiplayer based on sockets and the memory management that goes with that. :roll_eyes:

I would appreciate a lot if someone can give some concrete examples on the above statement.
Thanks

Apparently they are asking for ridiculous amounts of money for the license. I can only imagine they want something in the millions or a huge cut of profit since Unity has been happily partnering with tons of other companies but still can’t come to an agreement with Xamarin after years and years of legal crap.

Someone from the Unity dev team said a few words about this (I can’t find the thread at the moment).

Apparently Unity Technologies obtained a special license from Novell (back when Mono was still owned by Novell) that allows them to modify the Mono source code and to keep their changes private.

Now they’re looking for a long-term agreement with Xamarin that will also allow UT to upgrade to future Mono versions without them having to renegotiate the license terms all over each time. This seems to be where both parties are stuck.

Supposedly one can replace Mono with Visual Studio if you own a copy; couldn’t one also buy the latest release of Mono themselves and replace the dated version inside Unity with that?
Although, Mono doesn’t seem to be any cheaper than Visual Studio for some crazy reason, so I don’t know why anyone would choose it.

It’s not about the text editor, it’s about the framework

Mono =/= MonoDevelop.
Mono is the runtime that compiles and executes your code when the game is running.
MonoDevelop is the tool that you can optionally use to write your code - you can alternatively use Visual Studio or Notepad.

Do I need to explain the difference between Java and JavaScript while I’m here?

Go right ahead, I have tea and biscuits and some face paint… We can have a little geek party!.

you also wouldn’t be able to just get the latest version of mono and replace it in unity anyways. they’ve apparently made some source changes on their end, and plus unity would probably break because its expecting certain behaviours in the old version.

Wish it would be fast and shows syntax errors on the go.

Don’t you get it to be able to deploy to WebGL via asm.js they have to convert the code base to C/C++ then asm.js converts it to javascript.

So UT must have a C# to C/C++ conversion process, which could allow them to bypass/drop Mono on all platforms.

Could and could, I bet their CIL to C++ converter uses Mono to compile C# (+US) to CIL. To bypass/drop Mono they would need to create their own Common Language Runtime and .NET framework.

Oh, and yeah, Unity needs a Mono upgrade. Tiny example: It’s a bit annoying to have to choose between foreach loops that generate garbage and for loops that do unnecessary bounds checks.