I am thinking to learn Unity, and I noticed two things at first glance:
- It works with C# scripting
- It builds applications for many different platforms
How is this possible? Will the final application be .NET dependent? What about mobile apps?
Is it possible to code for Unity in any other language, let’s say, C++?
In a few words, how the build process works?
So here is an extract on the topic from a book im writing, perhaps gives you an idea in lament terms. Similar for ios builds, will be built and packaged using xCode and android using gradle.
The core behind unitys engine is written in C++ and has already been compiled to native code once we’ve built a project, its referred to as engine code. Managed code is what we create and when compiled, its integrated into a system called managed runtime. This is frequent in software development, where simple garbage collection and exception checks are conducted. During execution, the CPU bounces between instructions from managed code and engine code. We need to take caution handling these various safety checks when managed code is being converted to a format the engine code can understand. This conversion process is known as marshalling, and will show you various techniques to prevent issues related to marshaling from occuring in your project. It’s not an expensive process on its own, but like most things in software development, once something is passed to be looped it’s easy to increase calls over a short period of time.