Unity 4.6.2 iOS 64-bit support
Today we announce the public release of Unity 4.6.2, available for download as of right now. It is the first public release with iOS 64-bit support, using our new IL2CPP technology.
IL2CPP is an innovative scripting technology developed in-house by Unity. It delivers greatly improved performance for all scripting inside your projects, and is compatible with the current Mono-AOT solution used on iOS builds.
IL2CPP enables us to rapidly port our scripting solution to new platforms (like our WebGL support) and architectures, of which ARM64 (the architecture that underpins 64-bit on iOS devices) is one. With Unity 4.6.2 you’ll thus be able to make a Universal build that works on both 32-bit and 64-bit iOS devices.
Impressive performance improvements
During our alpha and beta cycles we’ve benefited from lots of really useful feedback from the Unity Community. And, users testing our iOS 64-bit and IL2CPP support frequently reported their scripts running much faster with the new scripting backend.
For example, Andrew Witte, who was running the RayTraceBenchmark on his 32-bit iOS device (benchmark performed on an iPad Mini, 1st gen), achieved the following:
Of course, what we care about most is your scenarios, but during our benchmarking we also saw significant performance improvements.
This is the simple total time of a JPEG Encoder written in UnityScript (this benchmark was performed on an iPad Air 2):
This is the Mandelbrot benchmark that is part of the Unity benchmark used for testing WebGL; it shows a significant performance increase on IL2CPP (this benchmark was performed on an iPad Air 2) :
Get started with iOS 64-bit support
In this new build, enabling the IL2CPP scripting backend and iOS 64-bit support on your project is just a couple of clicks away. In the Player Settings for iOS you’ll find two new dropdowns: “Scripting Backend” and “Architecture”.
Switching the scripting backend to IL2CPP unlocks the 64-bit iOS support. By default it builds for “Universal” Architecture, which means your builds will include both the ARMv7 and ARM64 binary slices in your application.
If your existing project depends on native plugins, you might need to upgrade them to a version that supports 64-bit iOS and IL2CPP. We partnered with Unity plugin developer Prime31 to get all their plugins upgraded for use on iOS64. You can download them here.
Once this is done, export your project to Xcode. Note that because IL2CPP outputs scripts as C++ into your Xcode project, you’ll need to set the configuration to Release to utilize the full performance optimization of the Clang compiler on the IL2CPP generated code.
You can see how to set it up in the following two screenshots from Xcode 6:
Now you’re ready to run your application on a device. Use the Architecture “Universal” player setting, and the appropriate code will run automatically whether you’re using a 64-bit or 32-bit device. You can get a more detailed iOS 64 bit upgrade guide from the Unity manual.
Things to be aware of:
WebRequest/WebClient API is currently available but not functioning. Anything requiring asynchronous sockets through Delegate BeginInvoke/EndInvoke currently doesn’t function. We will address this in an upcoming patch release.
Delegate BeginInvoke/EndInvoke will not work though other delegate functions are working well. We will address this in an upcoming patch release.
RakNet networking has not yet been ported to IL2CPP, and causes issues if you or 3rd party assemblies reference it. We will address this in an upcoming patch release.
Stripping is always performed when on the IL2CPP backend. This might necessitate workarounds to prevent stripping of used types.
When stripping is set to micro-mscorlib, compilation might fail on missing types. We are planning to completely disable its selection for IL2CPP in a future build.
Xcode takes longer to build. The main reason being that there is a far greater amount of source code to compile.
Managed Debugger is not supported. We have it on our roadmap. In the meantime, beta users have had great success debugging their script code using the Xcode debugger.
Enabling the Xcode Internal profiler will result in compilation errors when using the IL2CPP scripting backend.
We are very aware that some of the items on the above list will cause shipping delays for some. Ever since Apple’s Oct 20 announcement that new iOS apps uploaded to the app store must have 64-bit support, we’ve been working around the clock, picking off bug-reports at an unprecedented rate while pushing out new builds weekly.
Everyone working on this deeply cares about getting every single issue resolved as quickly as humanly possible.
If you already have your iOS project on the App Store, we recommend that you keep shipping updates using the Mono backend on ARMv7. Apple states that you can continue to do this up until June 1. We further recommend that you commence internal testing of your project using the IL2CPP backend as soon as practically possible.
We’re continuing our weekly builds and you can check out our patch releases regulary on http://unity3d.com/unity/qa/patch-releases. Please feel free to reach out to us on this forum thread. We answer queries daily.
Update; we had mirrored some of the benchmarks (Xamarin.iOS 126.96.36.199 LLVM/No-LLVM) in the RayTraceBenchmark that are pointed out to be incorrect, as they are made in debug mode. We’ve thus chosen to update the bar-chart, leaving only the comparison with Mono 2.6 with IL2CPP (which are both tested in Unity).
Update2: after verifying the RayTraceBenchmark we labeled as Mono 3.2 ran in Release mode and testing on a range of devices, we have reverted the post to reflect the original numbers.
87 CommentsSubscribe to comments
Comments are closed.