Giter VIP home page Giter VIP logo

hybridclr_trial's Introduction

HybridCLR 体验项目

一个示例热更新项目。本示例演示了热更新脚本挂载到热更新资源中,并且正常运行。

想了解更多,请加 QQ群:

  • HybridCLR c#热更新 开发交流群:651188171
  • HybridCLR 新手群:428404198

示例项目使用 Unity 2020.3.33(任意后缀子版本如f1、f1c1、f1c2都可以) 版本,2019.4.x、2020.3.x、2021.3.x系列都可以,但为了避免新手无谓的出错,尽量使用2020.3.33版本来体验。

目录介绍

  • Assets Unity项目目录
    • Main AOT主包模块,对应常规项目的主项目,资源更新模块
    • 剩下代码在默认的全局Assembly-Csharp.dll中,均为热更新脚本

安装

参考安装文档进行安装。

HybridCLR相关Editor菜单介绍

  • HybridCLR/Settings 打开HybridCLR相关设置
  • HybridCLR/BuildBundles 构建用于热更资源和代码的ab包
  • HybridCLR/Build 一键打包相关快捷命令
  • 其他菜单介绍请参见 hybridclr_unity package

体验热更新

打包

如果是Win平台,已经提供提供了快捷的菜单命令:

  • 菜单 HybridCLR/Build/Win64 ,运行完成后,会在Release_Win64目录下生成程序
  • 运行Release_Win64/HybridCLRTrial.exe,会看到打出 hello, HybridCLR.prefab

如果是其他平台:

  • 运行菜单 HybridCLR/Generate/All 一键执行必要的生成操作
  • Build Settings里打包游戏
  • 运行菜单 HybridCLR/BuildBundles/ActiveBuildTarget 打包ab文件
  • Assets/StreamingAssets下的ab包复制到你刚才打包的游戏的StreamingAssets目录
  • 运行刚刚打包成功的游戏

热更新测试

  • 修改Assets/HotFix/HotfixMain.cs的代码,比如添加打印 "hello,world"。
  • 运行菜单 HybridCLR/BuildBundles/ActiveBuildTarget 重新生成ab
  • Assets/StreamingAssets下的ab包复制到你刚才打包的游戏的StreamingAssets目录
  • 再将运行,屏幕上会打印"hello,world"。

hybridclr_trial's People

Contributors

5yaojing avatar bian-sh avatar bianchui avatar flameskydexive avatar pirunxi avatar rigyuki avatar roland0511 avatar ron3 avatar shuaigao avatar zxsean 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.