- Home /
Unity compilation process - JIT and AOT?
In the docs, it seems Unity compiles all scripts to dlls, which are JIT compiled at runtime. http://docs.unity3d.com/Documentation/ScriptReference/index.Script_compilation_28Advanced29.html
Is JIT always used?
Where does AOT fit in, and is AOT done only for some platforms? Are both AOT and JIT used for each platform?
When AOT-compiled, do we lose any functionality?
Also, if you use generics, does that force your AOT to actually be JIT?
Answer by Graham-Dunnett · Nov 11, 2012 at 09:48 PM
On iOS devices scripting languages are explicitly prohibited by Apple, so on that platform we AOT (ahead-of-time) compile the code into assembler during the build process. When you use AOT reflection is not supported, since this typically generates c# at run-time.
HI Graham, can you explain how components relate to AOT/JIT, i.e., are Unity components compiled to their own assembly http://answers.unity3d.com/questions/346501/unity-as-a-components-based-system.html
Here's possibly a better question - http://answers.unity3d.com/questions/346881/how-does-unity-compilation-work.html
On iOS, scripting languages aren't prohibited, you just aren't allowed to dynamically generate code. So you can use a scripting language with an interpreter, but you can't use a JIT interpreter or any kind of interpreter that dynamically compiles to native code.