Upgraded Mono .NET 4.6 in Unity 5.5
There is now an experimental build of Unity 5.5.0b4 with .NET 4.6!
https://forum.unity3d.com/threads/upgra ... b4.433541/
So we can now use new C# 6 language features.
It simplifies PropertyChanged with the Safe Navigation Operator (?.), CallerMemberName and nameof(): https://jeremybytes.blogspot.nl/2016/02 ... of-in.html
CallerMemberName
Visual Studio will offer to convert your old school PropertyChanged implementation using null checks with a single line thread-safe delegate invocation using the ?. operator.

With .NET 4.5's CallerMemberName not only you don't have to use magic strings, moreoever you don't even have to type the property name at all.

nameof()


A bit more verbose than CallerMemberName, but the article linked above favors it for human readability. You're still avoiding magic strings with the literal property name, so refactoring won't break your code anymore.
MVVM classes
The MVVM classes are now built-in. System.Collection.ObjectModel.ObservableCollection, System.Windows.Input.ICommand, System.ComponentModel.INotifyPropertyChanged, etc.
https://forum.unity3d.com/threads/upgra ... b4.433541/
So we can now use new C# 6 language features.
It simplifies PropertyChanged with the Safe Navigation Operator (?.), CallerMemberName and nameof(): https://jeremybytes.blogspot.nl/2016/02 ... of-in.html
CallerMemberName
Visual Studio will offer to convert your old school PropertyChanged implementation using null checks with a single line thread-safe delegate invocation using the ?. operator.

With .NET 4.5's CallerMemberName not only you don't have to use magic strings, moreoever you don't even have to type the property name at all.

nameof()


A bit more verbose than CallerMemberName, but the article linked above favors it for human readability. You're still avoiding magic strings with the literal property name, so refactoring won't break your code anymore.
MVVM classes
The MVVM classes are now built-in. System.Collection.ObjectModel.ObservableCollection, System.Windows.Input.ICommand, System.ComponentModel.INotifyPropertyChanged, etc.
Re: Upgraded Mono .NET 4.6 in Unity 5.5
These are really good news! We will try it as soon as possible.
Unfortunately, it seems they are going to support the two paths (API 2.0 and API 4.6) so we won't be able to completely get rid of it .
Thanks movra for all this information! Very kind. : D
Unfortunately, it seems they are going to support the two paths (API 2.0 and API 4.6) so we won't be able to completely get rid of it .
Thanks movra for all this information! Very kind. : D
Re: Upgraded Mono .NET 4.6 in Unity 5.5
We've been using Noesis with C# 6 and async/await in Unity for 7 months now using https://bitbucket.org/alexzzzz/unity-c- ... n/overview
It's working great and our app is async/await heavy, with lots of code ported from C# 6 project.
It's working great and our app is async/await heavy, with lots of code ported from C# 6 project.
Re: Upgraded Mono .NET 4.6 in Unity 5.5
And yes, the Unity Beta with C# 6 is awesome news - thanks for sharing!
Who is online
Users browsing this forum: No registered users and 0 guests