UnityReleaseNotes

Unity 3.4

Allegorithmic Substance Integration

Editor Improvements for more efficient game development

Release notes

Features

Editor

Improvements

Fixes

Graphics

Improvements

Fixes

Audio

Fixes

Unity iOS

Improvements

Fixes

Known Issues

Unity Android

Improvements

Fixes

Other Improvements

Other Fixes

Known Issues

JavaScript upgrade guide

In Unity 3.3 the code above compiles without errors but 3.4 will complain with something similar to:

Assets/Scripts/Bar.js(2,18): BCE0120: 'Foo.value' is inaccessible due to its protection level.

That’s because the 3.4 compiler can infer the call to GetComponent to return a Foo instance and it can see that Foo.value is marked private whereas in previous versions precise type information was lost at the GetComponent boundary. The solution is to mark Foo.value as either internal (accessible only to javascript code in the same project) or public (accessible to any code anywhere) - removing the private marker will have the same effect as marking it public.

Another change that might cause compilation errors is the removal of the Boo.Lang namespace from the list of global namespaces:

var l: List.;

Although the code compiles without issues in Unity 3.3 it probably doesn’t have the intended effect - which for most people would be to reference System.Collections.Generic.List.. The 3.4 compiler will complain with something like:

Assets/Scripts/WithGenericList.js(1,8): BCE0018: The name 'List' does not denote a valid type ('not found'). Did you mean 'Boo.Lang.List'?

The solution in this case is to either explicitly import the System.Collections.Generic namespace or to fully qualify the List reference:

import System.Collections.Generic;

var l: List.;
var m: System.Collections.Generic.List.;