tanghai 1a67662ce7 修复一个网络层bug,因为packetInfo中的bytes是使用Packet中的,为了减少gc,Packet中的bytes是一块共用的缓存,由于异步的存在,会覆盖这块内存,所以抛到hotfix层时需要重新new一块bytes 8 سال پیش
..
Editor d4d762cb9d 更新ILRuntime,增加对async await的支持,增加自动分析dll生成BindingCode 8 سال پیش
Generated 1a67662ce7 修复一个网络层bug,因为packetInfo中的bytes是使用Packet中的,为了减少gc,Packet中的bytes是一块共用的缓存,由于异步的存在,会覆盖这块内存,所以抛到hotfix层时需要重新new一块bytes 8 سال پیش
ILRuntime d4d762cb9d 更新ILRuntime,增加对async await的支持,增加自动分析dll生成BindingCode 8 سال پیش
Mono.Cecil.20 844d2ddd6a 升级ILRuntime到1.3版本 8 سال پیش
Mono.Cecil.Pdb 844d2ddd6a 升级ILRuntime到1.3版本 8 سال پیش
Editor.meta 30550b5ec0 ILRuntime支持了await,去掉Session回调形式调用 8 سال پیش
Generated.meta a8efa5515f 1.增加一个Hotfix对象,用来处理客户端热更入口,挂在Game对象上面 8 سال پیش
ILRuntime.meta 00307a04c8 1.npoi只是Editor用到,主工程不需要,移动到EditorPlugin下面 8 سال پیش
Mono.Cecil.20.meta 00307a04c8 1.npoi只是Editor用到,主工程不需要,移动到EditorPlugin下面 8 سال پیش
Mono.Cecil.Pdb.meta 00307a04c8 1.npoi只是Editor用到,主工程不需要,移动到EditorPlugin下面 8 سال پیش
README.md d4d762cb9d 更新ILRuntime,增加对async await的支持,增加自动分析dll生成BindingCode 8 سال پیش
README.md.meta d4d762cb9d 更新ILRuntime,增加对async await的支持,增加自动分析dll生成BindingCode 8 سال پیش

README.md

1.ILRuntime注意事项

使用ILRuntime需注意,ILRuntime自动生成BindingCode时,请务必将Unity、热更工程Hotfix加上“ILRuntime”宏, 然后在Unity菜单栏点击Tools/ILRuntime/Generate CLR Binding Code by Analysis,等待一会时间, 将会自动把热更中引用的类自动生成BindingCode放在ThirdParty/ILRuntime/Generated文件下,导出ios工程时, 请先将hotfix工程的属性改成Release模式,并勾选优化代码选项(不能勾选usafe代码,ILRuntime热更不支持) 并设置Strip Engine Code的勾选为空(不勾选),测试代码

    private int curSecond = 0;

    private async void SecondTimer()
    {
        TimerComponent timer = Game.Scene.GetComponent<TimerComponent>();
        while (true)
        {
            await timer.WaitAsync(1000);
            Debug.Log($"Current Second--{this.curSecond}");
            loginBtn.GetComponentInChildren<Text>().text = $"timer--{this.curSecond}";
            curSecond++;
        }
    }

在热更的UI逻辑代码Await里头调用SecondTimer函数,ios打包打印日志计时器正常输出