Unity3D in .Net Framework 4.0

Hello ,

Is it possible to target solution in .NET 4.0 Framework ?

Thanks

As far as Unity goes, you’re stuck with .NET 2.0 and some feature of newer version in a case-by-case basis, like Linq.

The Mono equivalent of .NET in Unity is approximately .NET 3.5.

–Eric

Thanks for the response

But i think that this is a big problem and must be solved as soon as possible.
What do you think ???

Why is the .Net version a big problem? What is it that your game cannot do if it can’t use .Net 4.0?

I can’t think of anything that makes it a problem at all.

–Eric

Well, it can be annoying if you try to use an external .DLL compiled in .NET > 3.5

2 Likes

There are many lacking features in the current version of Mono that Unity uses

  • SGen garbage collector (more efficient)
  • async await operators
  • full covariance and contravariance support in generics
  • many other performance/convenience improvements

I guess if we’re lucky, they will announce a new version of mono at Unite 2014, but that’s still a long way off! :confused:

1 Like

Dynamic typing would be a godsend to work around the inability to use Unityscript components from C# components when the Plugins folder is unworkable. Not to mention that pretty much everyone despises the current Mono garbage collector so you guys are going to have to update eventually.

Compatibility with some libraries is becoming an issue and will only continue to grow.

Besides, given your user base, the better question is not what you cannot do, it’s what cannot you do as easily as you could with 4.0. I think everyone is aware of what most of those are.

Also, since you are obviously going to be supporting “4.0” at some point in the future, I don’t think a schedule for when you plan on getting there is unreasonable. Have you published one? Even roughly? We need to plan our development timeline, schedule, and make cost/benefit analysis as far as what tools or stuff we bring into our applications, just like you do. Work with us, here.

There are multi purposes about having .NET framework 4.0
First of all if you want to insert an External DLL which using this framework you can’t.
.Net Framework 4 ,4.5 use a lot of multithread functions that would be pleasure if we can use it…

i can’t use speechsynthesizer without 4.0 …

File.AppendAllLines << .NET 4.0 or above

As a library vendor targeting .NET, if Unity adds support for the latest version, we’ll be in the position to create a bunch of example code and start evangelizing Unity to our user base. I bet we are not the only ones.

In particular async/await support would be nice for game devs, but for .NET library authors, the cost of backporting 3.5 versions of code written for 4.0 is not easy to bear.

3 Likes

Add this to the list: Windows Store and Windows Phone ports are a pain since they use Microsoft’s .NET 4.5.1, while all other platforms are on an old patched version of Mono .NET 2.something. Current Mono .NET is 3.2.3.

Newer .NET features would be nice, but it is a really expensive fix for Unity to make. If I was a bean counter, I’d totally hold off on that for as long as possible.

Unity is using a patched version of Mono .NET that they licensed from Novell (remember them?) way back in the day. (I guess 2010/2011 is way back in the day now >.> ) This means that current updates to Mono .NET aren’t getting pushed through to Unity, unless the Unity team patches the features in themselves.

Since back then, Ximarin has taken over Mono .NET, but they also changed the license of newer versions to the LGPL so Unity can’t use newer versions of Mono .NET without paying Ximarin a fortune in licensing fees.

Sources:

http://mono-project.com/FAQ:_Licensing
http://www.mono-project.com/Compatibility

P.S. I’m not a Unity historian so I could be wrong, but this is the situation as I understand it.

1 Like

That’s why Unity is doing this.

–Eric

1 Like

Unity has fantastic uses in making non game applications for mobile with the new 2D (well, new to me) addition. I can see Unity as the number one medium for 2D applications soon. Eclipse was giving me migraines, so I thought I would try Unity and I’m pleased with the massive time reduction for basically the same hand churned results.

lol loony tracker.

thats not offensive at all considering the content

You’re right, politically correct isn’t one of my skills, oops.
It doesn’t offend me, but there are a lot of nuts out there. :hushed:

Thanks for the link. Some great information there! I’m still going to take a wait-and-see approach. Unity obviously has some very smart people working on this.