Mono Upgrade Details
Manual     Reference     Scripting   
Unity Manual > FAQ > Upgrading your Unity Projects from 2.x to 3.x > Mono Upgrade Details

Mono Upgrade Details

In Unity 3 we upgraded the mono runtime from 1.2.5 to 2.6 and on top of that, JavaScript and Boo improvements. Aside from all bug fixes and improvements to mono between the two versions, this page lists some of the highlights.

C# Improvements

Basically the differences betweeen C# 3.5 and C# 2.0, including:

JavaScript Improvements

		var list = new System.Collections.Generic.List.<String>();
		list.Add("foo");
		list.Sort(function(x:String, y:String) {
			return x.CompareTo(y);
		});
		list.Sort(function(x, y) x.CompareTo(y));
		function forEach(items, action: function(Object)) {
			for (var item in items) action(item);
		}
		function printArray(a: int[]) {
			print("[" + String.Join(", ", [i.ToString() for (i in a)]) + "]");
		}

		var doubles = [i*2 for (i in range(0, 3))];
		var odds = [i for (i in range(0, 6)) if (i % 2 != 0)];
		printArray(doubles);
		printArray(odds);
		interface IFoo {
			function bar();
		}

		class Foo implements IFoo {
			function bar() {
				Console.WriteLine("Foo.bar");
			}
		}
		final function foo() {
		}
		class Pair extends System.ValueType {
			var First: Object;
			var Second: Object;

			function Pair(fst, snd) {
				First = fst;
				Second = snd;
			}

			override function ToString() {
				return "Pair(" + First + ", " + Second + ")";
			}
		}

Boo Improvements

Page last updated: 2010-09-21