当前位置:网站首页>How is C# hot update better than Lua?
How is C# hot update better than Lua?
2022-08-10 06:14:00 【Youmeng Maker】
How is C# hot update better than Lua?
Hello everyone!In the last issue of sharing, I gave you some popular science, why does the game need hot updates?In short: a hot update can download only part of the update content without re-downloading
Load the entire game APP to enhance the player's experience.
But due to the limitations of the mobile operating system, especially the limitations of Apple IOS.Mobile operating systems usually cannot directly support hot updates, so we need to find a way to bypass this limitation.
So what exactly do we do as game developers?
There are two options here:
- Use traditional Lua-based hot update scheme
- Using a C sharp-based hot change solution
Let's talk about the first one first, if we adopt a new Lua-based hot update scheme.So whether you are using an IOS-based Apple phone or an Android phone
In order to bypass the restriction, you must first convert the program code you need to hot update into the corresponding Lua language script, and then the virtual machine is responsible for executing the script.
There are three disadvantages of using this method for heating:
Developers need to learn Lua, another development language besides C#.
In order for the development company to recruit developers who understand both the C sharp language used by the unity engine and the Lua language, the recruitment cost is greatly increased.
In order to bypass this limitation, a Lua virtual machine is added to execute Lua scripts during development, which adds a layer of conversion overhead from Unity's C# scripts to Lua scripts, so theoretically, using LuaThe execution efficiency of scripting to run program code is impossible to be higher than directly executing C# program in Unity engine.
It would be different if we used C sharp:
First, you don't need to learn a new programming language
Secondly, since the Android system does not restrict the execution of hot update code, we can use C# to reflect the hot update on the Android system.Since the Android system does not have the overhead of switching from the engine layer to the script layer, the Android code can obtain the same efficiency as directly executing the unity C# script;
Third, for the iOS system, a C#-based script hot update solution can be used, which is called ILRuntime.The development efficiency of ILRuntime is higher;
Fourth, the ILRuntime hot update solution is the hot update solution on the iOS system officially promoted by unity, so it will receive more support from the unity official in the future, and the development will be faster.
So how do we choose between Lua and C#?
Does Lua have no competitive advantage at all?We say that's not the case either.
Because Lua has developed for a long time, the accumulation of Lua will be more abundant.
As for ILRuntime, as long as we learn its development framework, we can use it in the project, and the efficiency of development and debugging is much more convenient than Lua.
So for developers, it is the best choice to learn both script hotfixing solutions at the same time.This can help you quickly improve your workplace competitiveness.Since hot update is a very important skill in game development, by learning these two hot update schemes, you can also be promoted from an ordinary developer to the main process of a game company faster, and lead a team to develop projects.
Since Lua is already a hot update solution under maintenance, we won't go into details.
How to learn ILRuntime?
First of all, we need to deeply understand and master the design of hot update architecture based on ILRuntime, as well as the two-way interaction between ILRuntime hot update script and unity native script.This can be mastered by analyzing the source code of
ILRuntime.
Secondly, due to the deviation in our understanding, we may encounter some so-called pits when we use ILRuntime for the first time.So how to avoid stepping on the pit?Here we need to learn some experience in using ILRuntime.
Thirdly, we said earlier that ILRuntime can achieve efficient development and debugging, including dual-mode support for reflective hotfixes and script hotfixes, so how do we create an efficient development workflow?
This requires us to really master this by studying commercial projects, not just looking at some demo-level toy code.
Today's good, today's sharing is here, and finally welcome everyone to pay attention to our "Unity Full Stack Development Master", Lua, ILRuntime double repair~
For more learning resources, please add QQ: 1517069595 to obtain (/enterprise-level performance optimization/hot update/Shader special effects/server/commercial project combat/weekly live broadcast/one-to-one guidance)
The full video can be clicked on the link of station B: https://www.bilibili.com/video/BV1k54y1n7Rp
边栏推荐
- Tkinter 模块学习
- 每日刷题(day02)——leetcode 622. 设计循环队列
- 解决错误 Could not find method leftShift() for arguments
- ArgumentException: GetComponent requires that the requested component ‘GameObject‘ derives from Mono
- 溶液中重金属去除
- 除砷树脂吸附原理
- 21天学习挑战赛--补种胡杨求最大连续胡杨数量
- 动态规划、背包问题 6/24 106-110
- Using parseInt() in TypeScript
- Unity中暂停、继续播放、杀死、正放、倒放Dotween动画
猜你喜欢
随机推荐
二次元卡通渲染之描边
ASP.Net利用代码点击相应按钮来关闭当前的页面(亲测有效)
51单片机BH1750智能补光灯台灯光强光照恒流源LED控制系统
Flutter的生命周期
mysql连接报错:Cannot get a connection, pool error Timeout waiting for idle object
【fiddler3】使用fiddler设置弱网模式
浅谈游戏中3种常用阴影渲染技术(1):平面阴影
VTK 初步 (1) ----- 可视化管线
氨氮吸附工艺
在Unity中让物体围绕自身的x、y、z轴进行旋转(亲测有效)
clickhouse出现数据重复问题
酸回收工艺原理
STM32单片机OLED经典2048游戏单片机小游戏
详解样条曲线(上)(包含贝塞尔曲线)
为什么游戏需要热更新?
Unity插件DOTween使用指南2(简释贝塞尔曲线)
屏幕后期处理之:Sobel算子实现边缘检测
Easy to master Unity of eight prior to rendering
Unity屏幕坐标转世界坐标,鼠标点击获取三维位置
二叉树 6/20 86-90