Unity Scripting Roadmap

Unity 5

Unity 5

This morning, Unity Technologies announced their plans for the future of scripting in Unity.

In their blog post, they outline the issues with the current generation of scripting, and their plans to make it smoother, smaller, and more nimble. Their plan hinges around a single new technology:

IL2CPP

What is IL2CPP?

Unity developed IL2CPP as a high performance distributed runtime, similar to Microsoft’s .NET. This allows the same code to be reused for every platform the Unity engine is built for, whether Windows 8, Linux, iOS, or Nintendo Wii.

This same runtime is what will allow Unity 5 to compile for WebGL and run without plugins in a web browser.

Current Issues

Today, Mono is used to leverage the ease of use of C#, access to 3rd party libraries, and near native performance to games produced with Unity. However, there are issues with this approach:

  • C# runtime performance still lags behind C/C++
  • The latest .NET features are not supported in Unity’s current version of Mono
  • A large amount of effort is required for porting, maintaining, and feature parity between platforms
  • Garbage collection can cause stuttering

These issues will be resolved using IL2CPP.

Methodology

Unity will use IL2CPP to compile scripts as native C++ code, and include a common set of managed code that can be utilized across platforms. This will allow not only platform-agnostic feature parity, but a dramatic increase to performance. Optimizations are able to be made both at the Unity level, as well as at the compiler level, because all of the scripts will be converted into C++ source code.

Future Plans

Unity 5 will include IL2CPP for building WebGL targets, with iOS targets expected to utilize IL2CPP within a year. However, additional changes are coming as well.

Microsoft’s .NET has advanced over the last few years. Unity currently supports .NET 2.0/3.5 era functionality, but many users have requested access to newer features. Unity will upgrade the Mono C# compiler, base class libraries, and runtime for use in the editor to a modern version of .NET. They are also collaborating with Microsoft to bring current and future .NET functionality to Unity.

IL2CPP also allows easier porting to new platforms, while bypassing many platform specific issues they were running into with each new offering in the past. This can be done because C++ compilers have already been well developed for those systems, and Unity will be leveraging them instead of having to recreate the wheel for each platform.

Learn More

This is huge news for projects targeting multiple platforms, as it means fewer cross-compatibility issues and less development time. You can learn more about IL2CPP and the Mono toolchain on the Unity blog and in the forums.

Go Get It!

Unity 5 is not yet available, but will be coming late this year. You can order Unity 5 Pro, and receive Unity 4 Pro to use until its release, or you can get started by downloading the free version of Unity 4 today. Note that there will likely need to be some project cleanup involved when moving between full releases.

Browncoat Jayson

Join me in New Britannia!

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *