GithubHelp home page GithubHelp logo

gannicusy / assemblies-hotfix-toolkit-unity Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bian-sh/assemblies-hotfix-toolkit-unity

0.0 0.0 0.0 4 MB

Assemblies hotfix with unity addressable , for windows and android , both mono and IL2CPP scripting backend,IL2CPP hotfix powered by wolong(HybridCLR)

C# 99.93% Objective-C++ 0.07%

assemblies-hotfix-toolkit-unity's Introduction

Assemblies-Hotfix-Toolkit-Unity

这个工具为实现基于 Addressables 的无感知逻辑热更而作! 本工具实现对用户指定的需要热更的程序集实施校验、转存以及打包过滤。 有了本工具,留给用户只的操作只剩下:

  1. 拖入程序集
  2. 解决校验出来的错误
  3. 首次 force build 程序集

预览

Editor Rumtime Some Errors
热更程序集配置页面 运行时加载顺序排序与预览 编辑器下一些常见错误预览

功能

下面简要的说明本工具功能:

  1. 对指定的热更程序集进行校验:

    a. 引用框为空则警示

    b. 识别编辑器程序集并警示

    c. 识别被默认程序集引用并警示(默认程序集:Assembly-CSharp.dll,Assembly-CSharp-firstpass.dll)

    d. 如果热更程序集被引用,则展示被引用的程序集并提示需要修复

  2. 热更程序集在 Addressables 打包时自动转存为 .bytes 文件并打包到 ab 中

  3. 将 .bytes 文件及其配置文件 自动加入 Addressables Group

  4. 对加载的程序集自动进行拓扑排序,保证程序集按正确的引用顺序加载

演示

Editor 工作流演示

安装

通过 git 链接安装: 将url https://github.com/Bian-Sh/Assemblies-Hotfix-Toolkit-Unity.git?path=Packages/com.bshsf.hotfix-toolkit 拷贝并添加到 Package Manager

支持 Unity 版本:Unity 2020 及以上.

国内用户使用需要一些技巧,或者多试几次。

使用

  1. 本工具依赖 Addressable,使用前请初始化 Addressables
  2. scripting backend : mono 默认支持逻辑热更,适用于 PC 和 安卓
  3. scripting backend : il2cpp 请先安装 huatuo 以支持全平台的逻辑热更。
  4. 拿本项目测试的同学请先清除 aa 相关缓存。
  5. 热更程序集处理流程:

对需要热更的模块添加 assembly definition file

👉 拖入此 .asmdef(assembly definition file)文件到本工具 Editor 页面

👉 解决可能出现的异常

👉 新增 .asmdef 文件后需要点击下方“Assembly Force Build”按钮

👉 其余为工具自动操作:打 AA(Addressabls)自动转存 .bytes 文件,打app 自动剔除热更逻辑

  1. 热更测试流程:

👉 使用 Addressables Group 窗口打个首 AB 包

👉 使用 Build Settings 窗口打个首包,譬如:aa.exe

👉 修改热更程序集种的逻辑为自己想要输出的

👉 使用 Addressables Group 窗口打 Update a previous build 打 ab 的更新包

👉 重启打包的应用即可看到修改的逻辑生效,至此热更演示完成!

  1. 友情提示:

    a. il2cpp 逻辑热更需要深度学习一下相关的限制及应对措施(主要围绕类型裁剪)!

    b. mono 逻辑热更,Serializable Type 即便通过 inspector 赋值了,也无法在 ab 中正常使用,👉 更多

    c. 由于风云聚变,目前huatuo已经转变为 wolong ,且安装流程发生了变化,本工具判定 huatuo 安装与否的逻辑已经不适用 wolong ,注释掉逻辑即可 (后期我会将 wolong 安装也内嵌到本工具)。 d. hybridclr(wolong) 目前正在积极的开发一键部署工具,后面使用方式会更加简单,届时这个仓库也会同步更新、集成官方相关工作流。

assemblies-hotfix-toolkit-unity's People

Contributors

bian-sh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.