xLua学习之路(一) ------ 学习资料/准备工作

学习资料:

  • Unity场景异步加载的进度条制作 :https://blog.csdn.net/sinat_20559947/article/details/50000455
  • Xlua官网:https://github.com/Tencent/xLua
  • 使用指南:https://github.com/Tencent/xLua/blob/master/Assets/XLua/Doc/hotfix.md
  • 官方FAQ:https://github.com/Tencent/xLua/blob/master/Assets/XLua/Doc/faq.md
  • 评价腾讯在Unity下的xLua(开源)热更方案?:https://www.zhihu.com/question/54344452/answer/139413144?group_id=800755990562734080
  • IL(中间语言):http://blog.csdn.net/dodream/article/details/4726421
  • 玩转xLua的热补丁:http://gad.qq.com/article/detail/42303
  • xlua的配置:https://github.com/Tencent/xLua/blob/master/Assets/XLua/Examples/ExampleGenConfig.cs

准备工作:

    ①.首先进入官网下载xLua

    ②.将assets文件夹下所有东西全部拷贝到自己文件夹下


打开项目可以看到菜单栏多了一个xLua

    

  ③.打开宏

        File - Build Settings -Player Settings - other Settings - Scriptsing Define Symbols输入HOTFIX_ENABLE

        再观察XLua就会发现多了一个选项:

                                                             

    ④.补坑

         运行08_Hotfix场景

扫描二维码关注公众号,回复: 1372501 查看本文章


这是因为在开发环境,没有打包,所以应该先执行两个步骤

                                              

  •  生成Generate库,只要项目中有脚本等的更改都需要重新生成
  •  将新生成的代码注入到编辑器里面

      执行第二步时时有可能发现报下图的错误:

                                     

      将官方案例中Tools文件夹拷贝到同级目录下(注意,是与assets同级目录下)

                            

        直至完成为止:

                      

     ⑤.解决warning

         有可能会遇到这个问题:

                                                     

          解决办法:

                 找到Unity安装目录\Editor\Data\Managed -- 将Unity.Cecil.dll、Unity.Cecil.Mdb.dll、Unity.Cecil.Pdb.dll三个dll拷贝到 项目\Assets\XLua\Src\Editor下

            如果重新执行上面两步骤还报这个错误,检查项目有没有中文路径

     ⑥.成功运行


至此环境配置成功

猜你喜欢

转载自blog.csdn.net/dengshunhao/article/details/80516783
今日推荐