[History of Programming Language Development] Historical development of Unity development language

UnityWhen developing early versions, a JavaScript-like language called UnityScript was used. However, over time, the majority of the developer community was leaning towards developing in C#, and Unity decided to focus on C# because of its stronger ecosystem, better performance, and wider developer base. Community support. Therefore, Unity gradually abandoned UnityScript in subsequent versions and used C# as the preferred development language.

Cross-platform implementation in C#

Nowadays, we are all accustomed to using C# in Unity, and we can easily write programs without worrying about how our code is cross-platform: cross-platform seems to be a very natural thing.

C# is implemented by Microsoft based on the .net framework. It does not support cross-platform. Before the emergence of .NetCore, it could not even run on devices other than Windows. In order to achieve the goal of cross-platform, the Unity engine chose Mono as its main script. Runtime environment.

Mono is an open source, cross-platform .net framework implementation. It can be simply understood as a virtual machine, which allows C# code to run perfectly on various desktop and mobile devices. Running, it also solves the big problem of cross-platform. With the help of Mono's cross-platform capabilities, Unity has also made rapid progress in the market competition in previous years.

Cross-platform implementation of C#-Mono

IL2CPP

Although Mono solves a big problem, it obviously doesn't solve all problems. After all, Mono is not Unity's own product. It has slow update iterations, delayed support for new features, and the inability to use new C# features... But the focus is still on security and performance. Unity occupies the mobile market, and mobile devices are very sensitive to performance.

Starting in 2014, Unity officially introduced the IL2CPP compiler. IL2CPP compiles C# scripts into C++ code, and then further compiles it into local machine code, changing from the previous JIT to AOT. Generally speaking, IL2CPP removes the "Mono virtual machine" mentioned above, eliminating the need for intermediate links.

The advantages of IL2CPP are mainly reflected in the following aspects:

Performance optimization:By compiling C# scripts into native machine code, IL2CPP eliminates the overhead of script interpretation and execution, greatly improving game performance. It allows for more efficient code optimization and memory management while the game is running.

64-bit support:Since Apple decided that apps must support 64-bit architecture starting in 2015, the 64-bit era of mobile terminals has also arrived. Mono integrated by Unity currently does not have a 64-bit implementation on the mobile terminal, which means that if you want to distribute applications/games, you must use IL2CPP.

Platform Compatibility:IL2CPP can compile C# code into native code relevant to the target platform, thus achieving better platform compatibility. Whether on PC, console or mobile device, IL2CPP generates code that is tightly integrated with the platform.

Security:Because IL2CPP compiles to native machine code, it provides greater code security, reducing the risk of scripts being vulnerable to attacks.

In the future, the Unity team will continue to improve and optimize Mono and IL2CPP. For Mono, they are committed to improving the performance and development workflow of scripts, improving the responsiveness and stability of the editor, and providing more tools and features to support developer creation. In terms of IL2CPP, they will continue to optimize the compiler and runtime environment, improve the effects of code generation and optimization, and further expand platform support.

Unity introduces IL2CPP compiler

In general, Mono and IL2CPP play different roles in Unity. Mono provides a flexible scripting runtime environment for rapid iteration and development of game logic, while IL2CPP provides higher performance and cross-platform compatibility by compiling to native code. The Unity team will continue to improve these two technologies to provide a better game development experience and performance.

suggestion

If you are developing a mobile application and preparing to publish it to the app store, whether it is AppSotre, GooglePlay, or major domestic application markets, 64-bit support is a necessary condition, so IL2CPP is also the only option.

If you are a content developer on the Window platform, for the sake of performance and stability, it is still strongly recommended that you use IL2CPP packaging.

If you plan to distribute your application to ourreal-time cloud rendering platform, due to the older Mono virtual machine, it is not considered There is a problem with the server architecture of cloud rendering and the possibility of bugs. It is currently known that Mono and some commonly used plug-ins will have compatibility issues in the cloud rendering environment. Therefore, for the stability of application operation, it is still strongly recommended that you use the modern IL2CPP packaging.

summary

3DCAT is a real-time rendering technology based on various game development engines (such as Unity, UE4, etc.). By utilizing cloud computing rendering and network streaming technology, it can produce and push high-quality rendering content to users in real time. terminal equipment. This technology meets the access needs of a wide range of users. Regardless of time and place, users can have an immersive and highly interactive experience across terminal devices. At the same time, 3DCAT provides ultra-high-definition images and visual effects, allowing users to enjoy a realistic and stunning virtual world. Whether used for games, virtual reality, architectural design or other application fields, 3DCAT's real-time rendering capabilities provide users with unprecedented visual experience and interactivity .

Guess you like

Origin blog.csdn.net/m0_64476561/article/details/134275743