- Home /
.NET assemblies and non-.NET platforms
I'm fairly new to Unity still, and I'm curious about what happens when you use any .NET assemblies in your scripts, and you build and run your code on say an iOS, or Android device.
For example, say I added using System.Xml;, how would this end up working on any other non-.NET platform? Do these just get compiled along with the rest of the code, and deployed to the other platforms? Do the other platforms already have, or require, a .NET runtime?
Answer by Bunny83 · Apr 29, 2013 at 07:28 AM
Unity uses the Mono-framework on all platforms. It's an open-source implementation of the .NET framework. Unity will include only those dlls that you use. If you use System.Xml it will include the System.dll and System.Xml.dll. Those are quite large and should be avoided on mobile builds.
See the docs on how to reduce the filesize.
Also take a look at the mono compatibility page. Not all classes / functions are suppported on all platforms. Also some namespaces are completely missing.